1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Andy

Beiträge von Andy

  • Excel nach PDF konvertieren?

    • Andy
    • 6. Februar 2014 um 17:31

    Hi,
    schau dir mal in deiner Funktion oeffnen() an, was nach der Dateiauswahl von mehreren Dateien in der Variable $code steht...

  • Pixeln aus 1bit BMP auslesen - vertikal (Scanlines emulieren)

    • Andy
    • 6. Februar 2014 um 17:24

    Hi,
    zuerst dachte ich auch an eine Drehung, das stimmt aber leider nicht
    Die obersten 8 Bit in der ersten Spalte sollen in umgekehrter Bitfolge als erstes Byte in der Zeile stehen!
    Aus dem jeweils ersten Bit (MSB) in der ersten Spalte
    1
    0
    0
    1
    1
    1
    1
    1
    soll das erste Byte 11111001 werden.

    Zitat

    Ich hab aber auch noch nicht ganz verstanden, was eigentlich der Sinn und Zweck dieses Scriptes sein soll...

    Ich vermute, irgendein esoterisches Programm liest diese seltsamen Dateien ein...
    Irgendwo habe ich etwas mit Barcodes gelesen, das erklärt manches ;(

    //EDIT
    Die Drehung ist aber schon einmal ein guter Anfang! Dann muss man nur noch die Bytes in der Zeile von vorne nach hinten XCHGen und innerhalb der Bytes die Bitfolge ändern 8| ich glaube, die Bitmap direkt umzuwandeln geht dann in ASM 5x schneller als die GDI-Drehung alleine^^

  • Happy Birthday, Andy

    • Andy
    • 4. Februar 2014 um 20:17

    Herzlichen Dank an alle!
    Es macht mir, auch nach so langer Zeit, immer noch Spaß in diesem Forum.
    Vor allem euch, den Usern, habe ich so manchen kurzweiligen Abend, und nebenbei auch die eine oder andere durchprogrammierte Nacht zu verdanken.
    Die täglichen Anregungen (und manchmal auch Aufregungen 8o ) möchte ich nicht mehr missen....

  • Pixeln aus 1bit BMP auslesen - vertikal (Scanlines emulieren)

    • Andy
    • 4. Februar 2014 um 19:14

    Hi,
    habe gerade im "blauen" Forum dein crossposting gesehen...

    Verstehen kann man das aber nicht!
    Pixel auslesen und in ein "1-Bit"-Array übertragen ist eine Sache von einigen Millisekunden, egal wie groß deine Bitmap ist, das ist nicht das Problem!

    Für mich unverständlich ist, wieso du die in Zeilen angeordneten Pixel später Spaltenweise in Bytes "umdrehen" willst?!
    Ist das wirklich so gemeint? 90° Drehung und dann RGBA nach Bit konvertieren?

    Oder soll die Bitmap in eine einfache 1-Bit per Pixel Bitmap transferiert werden?

    //EDIT Ich vermute, du hast mit den "Scanlines" etwas missverstanden. "Scan lines" bedeutet die ZEILENWEISE Abtastung des Bildes, wie sie normalerweise auch durchgeführt wird. Du möchtest aber SPALTENWEISE das Bild abtasten? Ist das wirklich so gemeint?

  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 3. Februar 2014 um 07:29

    Klasse!
    Wenn man folgende Schleife benutzt, sieht man sehr deutlich die ab einer bestimmte Größe des Strings folgende Skalierung.
    Verdopplung der Stringgröße bewirkt eine Vervierfachung der Laufzeit.
    Das bissl Cache-Geplänkel hält sich in Grenzen, da die Berechnung prinzipbedingt an Laufzeit zulegt.... :rolleyes:

    Spoiler anzeigen
    [autoit]

    For $i = 1 To 16
    $sDec &= $sDec
    ConsoleWrite("! Dec Len: " & StringLen($sDec) & @CRLF)
    Global $iTimer = TimerInit()
    $sHex = _BigDecToHex($sDec)
    ConsoleWrite("! Time: " & TimerDiff($iTimer) & @CRLF & @CRLF)
    Next

    [/autoit]
  • XOR-Burn - Multicore CPU Stress Test

    • Andy
    • 2. Februar 2014 um 11:12

    Hi,
    der Code?
    Disassembler sagt, XOR nur im Namen ^^
    Es werden einfach nur von 1 bis 255 die Farben beim roten Anteil des Pixels gesetzt, sonst nix, und das in einer endlosen Schleife.

    Spoiler anzeigen
    Code
    .data:00401000 ;
    .data:00401000 ; +-------------------------------------------------------------------------+
    .data:00401000 ; ¦     This file is generated by The Interactive Disassembler (IDA)        ¦
    .data:00401000 ; ¦     Copyright (c) 2010 by Hex-Rays SA, <support@hex-rays.com>           ¦
    .data:00401000 ; ¦                      Licensed to: Freeware version                      ¦
    .data:00401000 ; +-------------------------------------------------------------------------+
    .data:00401000 ;
    .data:00401000 ; Input MD5   : 0A315D3748C93AF196AF06C6BA1A4129
    .data:00401000
    .data:00401000 ; File Name   : C:\Users\Mama\Desktop\XOR-Burn 1 Core.exe
    .data:00401000 ; Format      : Portable executable for 80386 (PE)
    .data:00401000 ; Imagebase   : 400000
    .data:00401000 ; Section 1. (virtual address 00001000)
    .data:00401000 ; Virtual size                  : 0000027C (    636.)
    .data:00401000 ; Section size in file          : 00000400 (   1024.)
    .data:00401000 ; Offset to raw data for section: 00000200
    .data:00401000 ; Flags C0000040: Data Readable Writable
    .data:00401000 ; Alignment     : default
    .data:00401000
    .data:00401000                 .686p
    .data:00401000                 .mmx
    .data:00401000                 .model flat
    .data:00401000
    .data:00401000 ; ---------------------------------------------------------------------------
    .data:00401000
    .data:00401000 ; Segment type: Pure data
    .data:00401000 ; Segment permissions: Read/Write
    .data:00401000 _data           segment para public 'DATA' use32
    .data:00401000                 assume cs:_data
    .data:00401000                 ;org 401000h
    .data:00401000 ; HINSTANCE hInstance
    .data:00401000 hInstance       dd 0                    ; DATA XREF: start+8w
    .data:00401000                                         ; sub_4028DF+96r
    .data:00401004                 align 8
    .data:00401008 dword_401008    dd 0                    ; DATA XREF: .code:00402210w
    .data:00401008                                         ; .code:0040221Fr ...
    .data:0040100C dword_40100C    dd 0                    ; DATA XREF: .code:0040221Aw
    .data:0040100C                                         ; .code:00402224r ...
    .data:00401010 flt_401010      dd 0.0                  ; DATA XREF: .code:00402444w
    .data:00401010                                         ; .code:0040244Ar ...
    .data:00401014                 align 10h
    .data:00401020 dword_401020    dd 0                    ; DATA XREF: .code:00402242w
    .data:00401020                                         ; .code:00402247r ...
    .data:00401024 ; CHAR dword_401024
    .data:00401024 dword_401024    dd 0                    ; DATA XREF: .code:0040256Bo
    .data:00401024                                         ; .code:00402576r ...
    .data:00401028                 db    0
    .data:00401029                 db    0
    .data:0040102A                 db    0
    .data:0040102B                 db    0
    .data:0040102C                 db    0
    .data:0040102D                 db    0
    .data:0040102E                 db    0
    .data:0040102F                 db    0
    .data:00401030                 db    0
    .data:00401031                 db    0
    .data:00401032                 db    0
    .data:00401033                 db    0
    .data:00401034                 db    0
    .data:00401035                 db    0
    .data:00401036 ; CHAR dword_401036
    .data:00401036 dword_401036    dd 0                    ; DATA XREF: .code:0040254Fo
    .data:00401036                                         ; .code:0040255Ar ...
    .data:0040103A                 db    0
    .data:0040103B                 db    0
    .data:0040103C                 db    0
    .data:0040103D                 db    0
    .data:0040103E                 db    0
    .data:0040103F                 db    0
    .data:00401040                 db    0
    .data:00401041                 db    0
    .data:00401042                 db    0
    .data:00401043                 db    0
    .data:00401044                 db    0
    .data:00401045                 db    0
    .data:00401046                 db    0
    .data:00401047                 db    0
    .data:00401048                 db    0
    .data:00401049                 db    0
    .data:0040104A                 db    0
    .data:0040104B                 db    0
    .data:0040104C                 db    0
    .data:0040104D                 db    0
    .data:0040104E                 db    0
    .data:0040104F                 db    0
    .data:00401050                 db    0
    .data:00401051                 db    0
    .data:00401052                 db    0
    .data:00401053                 db    0
    .data:00401054                 db    0
    .data:00401055                 db    0
    .data:00401056                 db    0
    .data:00401057                 db    0
    .data:00401058 dword_401058    dd 0                    ; DATA XREF: .code:0040209Ew
    .data:00401058                                         ; .code:004020A9r ...
    .data:0040105C word_40105C     dw 0                    ; DATA XREF: sub_402105+3w
    .data:0040105C                                         ; sub_402105+Br ...
    .data:0040105E word_40105E     dw 0                    ; DATA XREF: sub_402105+15w
    .data:0040105E                                         ; sub_402105+1Br ...
    .data:00401060 dbl_401060      dq 0.0                  ; DATA XREF: sub_40262B+3Ew
    .data:00401060                                         ; sub_40262B+4Fr ...
    .data:00401068 flt_401068      dd 0.0                  ; DATA XREF: start+25w
    .data:00401068                                         ; start+2Br ...
    .data:0040106C dword_40106C    dd 0                    ; DATA XREF: sub_402142+1Cw
    .data:0040106C                                         ; sub_402142+22r ...
    .data:00401070 dword_401070    dd 0                    ; DATA XREF: sub_402142+11w
    .data:00401070                                         ; sub_402142+16r
    .data:00401074                 align 8
    .data:00401078 dword_401078    dd 0                    ; DATA XREF: .code:004021FDw
    .data:00401078                                         ; .code:00402232w ...
    .data:0040107C dword_40107C    dd 0                    ; DATA XREF: .code:00402267w
    .data:0040107C                                         ; .code:0040229Cw ...
    .data:00401080 dword_401080    dd 0                    ; DATA XREF: .code:0040244Fw
    .data:00401080                                         ; .code:00402454r ...
    .data:00401084 dword_401084    dd 0                    ; DATA XREF: .code:0040242Bw
    .data:00401084                                         ; .code:00402430r
    .data:00401088 dword_401088    dd 0                    ; DATA XREF: .code:00402436w
    .data:00401088                                         ; .code:0040243Cr
    .data:0040108C dword_40108C    dd 0                    ; DATA XREF: .code:0040249Bw
    .data:0040108C                                         ; .code:004024A0r
    .data:00401090 dword_401090    dd 0                    ; DATA XREF: .code:004024A6w
    .data:00401090                                         ; .code:004024ACr
    .data:00401094 dword_401094    dd 0                    ; DATA XREF: .code:00402500w
    .data:00401094                                         ; .code:00402505r
    .data:00401098 dword_401098    dd 0                    ; DATA XREF: .code:0040250Bw
    .data:00401098                                         ; .code:00402511r
    .data:0040109C unk_40109C      db    0                 ; DATA XREF: .code:0040254Ao
    .data:0040109D aLdC            db '%ld%c',0            ; DATA XREF: .code:00402566o
    .data:004010A3                 align 4
    .data:004010A4 unk_4010A4      db    0                 ; DATA XREF: .code:004025BCo
    .data:004010A5 aLuC            db '%lu%c',0            ; DATA XREF: .code:004025D8o
    .data:004010AB                 align 4
    .data:004010AC ; char String2[]
    .data:004010AC String2         db 0                    ; DATA XREF: sub_40262B+3o
    .data:004010AD ; char aFC[]
    .data:004010AD aFC             db '%f%c',0             ; DATA XREF: sub_40262B+1Fo
    .data:004010B2                 db    0
    .data:004010B3 ; char byte_4010B3[]
    .data:004010B3 byte_4010B3     db 102h dup(0)          ; DATA XREF: sub_40273E+11o
    .data:004010B3                                         ; sub_40273E+1Co
    .data:004011B5 ; char aD[]
    .data:004011B5 aD              db '%d',0               ; DATA XREF: sub_40273E+Co
    .data:004011B8                 db    0
    .data:004011B9 ; WNDCLASSA WndClass
    .data:004011B9 WndClass        WNDCLASSA <0>           ; DATA XREF: sub_4028DF+11w
    .data:004011B9                                         ; sub_4028DF+86o ...
    .data:004011E1 ; struct tagMSG Msg
    .data:004011E1 Msg             tagMSG <0>              ; DATA XREF: sub_4028DF+14Fo
    .data:004011E1                                         ; sub_4028DF+17Co ...
    .data:004011FD ; HWND hWnd
    .data:004011FD hWnd            dd 0                    ; DATA XREF: sub_4028DF+106w
    .data:004011FD                                         ; sub_4028DF+10Br
    .data:00401201                 db    0
    .data:00401202                 db    0
    .data:00401203                 db    0
    .data:00401204                 db    0
    .data:00401205                 db    0
    .data:00401206                 db    0
    .data:00401207                 db    0
    .data:00401208                 db    0
    .data:00401209                 db    0
    .data:0040120A                 db    0
    .data:0040120B                 db    0
    .data:0040120C                 db    0
    .data:0040120D                 db    0
    .data:0040120E                 db    0
    .data:0040120F                 db    0
    .data:00401210                 db    0
    .data:00401211 dword_401211    dd 0                    ; DATA XREF: sub_40280F+75w
    .data:00401215 dword_401215    dd 0                    ; DATA XREF: sub_40280F+88w
    .data:00401219 ; HDC dword_401219
    .data:00401219 dword_401219    dd 0                    ; DATA XREF: sub_4028DF+117w
    .data:00401219                                         ; StartAddress+BDr ...
    .data:0040121D                 db    0
    .data:0040121E                 db    0
    .data:0040121F                 db    0
    .data:00401220                 db    0
    .data:00401221                 db    0
    .data:00401222                 db    0
    .data:00401223                 db    0
    .data:00401224                 db    0
    .data:00401225 unk_401225      db    0                 ; DATA XREF: sub_4028DF+72o
    .data:00401226 aDialogclass    db 'DialogClass',0      ; DATA XREF: sub_4028DF+7Co
    .data:00401232                 db    0
    .data:00401233 ; char WindowName[]
    .data:00401233 WindowName      db 'XOR-Burn - Single Core Stress Test - minxtech',0
    .data:00401233                                         ; DATA XREF: sub_4028DF+F1o
    .data:00401261                 align 2
    .data:00401262 ; char ClassName[]
    .data:00401262 ClassName       db 'DialogClass',0      ; DATA XREF: sub_4028DF+F6o
    .data:0040126E                 db    0
    .data:0040126F ; char aDialogclass_1[]
    .data:0040126F aDialogclass_1  db 'DialogClass',0      ; DATA XREF: sub_4028DF+19Co
    .data:0040127B                 align 200h
    .data:0040127B _data           ends
    .data:0040127B
    .code:00402000 ; Section 2. (virtual address 00002000)
    .code:00402000 ; Virtual size                  : 00000E82 (   3714.)
    .code:00402000 ; Section size in file          : 00001000 (   4096.)
    .code:00402000 ; Offset to raw data for section: 00000600
    .code:00402000 ; Flags 60000020: Text Executable Readable
    .code:00402000 ; Alignment     : default
    .code:00402000 ; ---------------------------------------------------------------------------
    .code:00402000
    .code:00402000 ; Segment type: Pure code
    .code:00402000 ; Segment permissions: Read/Execute
    .code:00402000 _code           segment para public 'CODE' use32
    .code:00402000                 assume cs:_code
    .code:00402000                 ;org 402000h
    .code:00402000                 assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
    .code:00402000
    .code:00402000 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:00402000
    .code:00402000 ; Attributes: bp-based frame
    .code:00402000
    .code:00402000                 public start
    .code:00402000 start           proc near
    .code:00402000
    .code:00402000 arg_4           = dword ptr  8
    .code:00402000
    .code:00402000                 push    0               ; lpModuleName
    .code:00402002                 call    ds:GetModuleHandleA
    .code:00402008                 mov     hInstance, eax
    .code:0040200D                 call    sub_4028DF
    .code:00402012                 push    0               ; uExitCode
    .code:00402017                 call    ds:ExitProcess
    .code:0040201D                 push    ebp
    .code:0040201E                 mov     ebp, esp
    .code:00402020                 fld     [ebp+arg_4]
    .code:00402023                 fsin
    .code:00402025                 fstp    flt_401068
    .code:0040202B                 mov     eax, flt_401068
    .code:00402030                 leave
    .code:00402031                 retn    4
    .code:00402031 start           endp ; sp =  4
    .code:00402031
    .code:00402034 ; ---------------------------------------------------------------------------
    .code:00402034                 push    ebp
    .code:00402035                 mov     ebp, esp
    .code:00402037                 fld     dword ptr [ebp+8]
    .code:0040203A                 fcos
    .code:0040203C                 fstp    flt_401068
    .code:00402042                 mov     eax, flt_401068
    .code:00402047                 leave
    .code:00402048                 retn    4
    .code:0040204B ; ---------------------------------------------------------------------------
    .code:0040204B                 push    ebp
    .code:0040204C                 mov     ebp, esp
    .code:0040204E                 fld     dword ptr [ebp+8]
    .code:00402051                 fptan
    .code:00402053                 fstp    flt_401068
    .code:00402059                 fstp    flt_401068
    .code:0040205F                 mov     eax, flt_401068
    .code:00402064                 leave
    .code:00402065                 retn    4
    .code:00402068 ; ---------------------------------------------------------------------------
    .code:00402068                 push    ebp
    .code:00402069                 mov     ebp, esp
    .code:0040206B                 fld     dword ptr [ebp+0Ch]
    .code:0040206E                 fld     dword ptr [ebp+8]
    .code:00402071                 fpatan
    .code:00402073                 fstp    flt_401068
    .code:00402079                 mov     eax, flt_401068
    .code:0040207E                 leave
    .code:0040207F                 retn    8
    .code:00402082 ; ---------------------------------------------------------------------------
    .code:00402082                 push    ebp
    .code:00402083                 mov     ebp, esp
    .code:00402085                 fldpi
    .code:00402087                 fstp    flt_401068
    .code:0040208D                 mov     eax, flt_401068
    .code:00402092                 leave
    .code:00402093                 retn    0
    .code:00402096 ; ---------------------------------------------------------------------------
    .code:00402096                 push    ebp
    .code:00402097                 mov     ebp, esp
    .code:00402099                 mov     eax, 43340000h
    .code:0040209E                 mov     dword_401058, eax
    .code:004020A3                 fld1
    .code:004020A5                 fldpi
    .code:004020A7                 fdivp   st(1), st
    .code:004020A9                 fld     dword_401058
    .code:004020AF                 fmulp   st(1), st
    .code:004020B1                 fld     dword ptr [ebp+8]
    .code:004020B4                 fmulp   st(1), st
    .code:004020B6                 fstp    flt_401068
    .code:004020BC                 mov     eax, flt_401068
    .code:004020C1                 leave
    .code:004020C2                 retn    4
    .code:004020C5 ; ---------------------------------------------------------------------------
    .code:004020C5                 push    ebp
    .code:004020C6                 mov     ebp, esp
    .code:004020C8                 mov     eax, 43340000h
    .code:004020CD                 mov     dword_401058, eax
    .code:004020D2                 fldpi
    .code:004020D4                 fld     dword_401058
    .code:004020DA                 fdivp   st(1), st
    .code:004020DC                 fld     dword ptr [ebp+8]
    .code:004020DF                 fmulp   st(1), st
    .code:004020E1                 fstp    flt_401068
    .code:004020E7                 mov     eax, flt_401068
    .code:004020EC                 leave
    .code:004020ED                 retn    4
    .code:004020F0
    .code:004020F0 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:004020F0
    .code:004020F0 ; Attributes: bp-based frame
    .code:004020F0
    .code:004020F0 sub_4020F0      proc near               ; CODE XREF: .code:004026FFp
    .code:004020F0
    .code:004020F0 arg_0           = dword ptr  8
    .code:004020F0
    .code:004020F0                 push    ebp
    .code:004020F1                 mov     ebp, esp
    .code:004020F3                 fild    [ebp+arg_0]
    .code:004020F6                 fstp    flt_401068
    .code:004020FC                 mov     eax, flt_401068
    .code:00402101                 leave
    .code:00402102                 retn    4
    .code:00402102 sub_4020F0      endp
    .code:00402102
    .code:00402105
    .code:00402105 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:00402105
    .code:00402105 ; Attributes: bp-based frame
    .code:00402105
    .code:00402105 sub_402105      proc near               ; CODE XREF: sub_402142+Cp
    .code:00402105
    .code:00402105 arg_0           = dword ptr  8
    .code:00402105
    .code:00402105                 push    ebp
    .code:00402106                 mov     ebp, esp
    .code:00402108                 fstcw   word_40105C
    .code:0040210F                 wait
    .code:00402110                 mov     ax, word_40105C
    .code:00402116                 or      ax, 0C00h
    .code:0040211A                 mov     word_40105E, ax
    .code:00402120                 fldcw   word_40105E
    .code:00402126                 wait
    .code:00402127                 fld     [ebp+arg_0]
    .code:0040212A                 frndint
    .code:0040212C                 fldcw   word_40105C
    .code:00402132                 wait
    .code:00402133                 fstp    flt_401068
    .code:00402139                 mov     eax, flt_401068
    .code:0040213E                 leave
    .code:0040213F                 retn    4
    .code:0040213F sub_402105      endp
    .code:0040213F
    .code:00402142
    .code:00402142 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:00402142
    .code:00402142 ; Attributes: bp-based frame
    .code:00402142
    .code:00402142 sub_402142      proc near               ; CODE XREF: .code:004021F8p
    .code:00402142                                         ; .code:00402262p ...
    .code:00402142
    .code:00402142 arg_0           = dword ptr  8
    .code:00402142
    .code:00402142                 push    ebp
    .code:00402143                 mov     ebp, esp
    .code:00402145                 lea     eax, [ebp+arg_0]
    .code:0040214B                 mov     eax, [eax]
    .code:0040214D                 push    eax
    .code:0040214E                 call    sub_402105
    .code:00402153                 mov     dword_401070, eax
    .code:00402158                 fld     dword_401070
    .code:0040215E                 fistp   dword_40106C
    .code:00402164                 mov     eax, dword_40106C
    .code:00402169                 leave
    .code:0040216A                 retn    4
    .code:0040216A sub_402142      endp
    .code:0040216A
    .code:0040216D
    .code:0040216D ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:0040216D
    .code:0040216D ; Attributes: bp-based frame
    .code:0040216D
    .code:0040216D sub_40216D      proc near               ; CODE XREF: .code:0040220Bp
    .code:0040216D                                         ; .code:00402275p
    .code:0040216D
    .code:0040216D arg_0           = dword ptr  8
    .code:0040216D
    .code:0040216D                 push    ebp
    .code:0040216E                 mov     ebp, esp
    .code:00402170                 fld     [ebp+arg_0]
    .code:00402173                 fstcw   word_40105C
    .code:0040217A                 wait
    .code:0040217B                 mov     ax, word_40105C
    .code:00402181                 or      ax, 0C00h
    .code:00402185                 mov     word_40105E, ax
    .code:0040218B                 fldcw   word_40105E
    .code:00402191                 wait
    .code:00402192                 fld     [ebp+arg_0]
    .code:00402195                 frndint
    .code:00402197                 fldcw   word_40105C
    .code:0040219D                 wait
    .code:0040219E                 fsubp   st(1), st
    .code:004021A0                 fstp    flt_401068
    .code:004021A6                 mov     eax, flt_401068
    .code:004021AB                 leave
    .code:004021AC                 retn    4
    .code:004021AC sub_40216D      endp
    .code:004021AC
    .code:004021AF ; ---------------------------------------------------------------------------
    .code:004021AF                 push    ebp
    .code:004021B0                 mov     ebp, esp
    .code:004021B2                 fstcw   word_40105C
    .code:004021B9                 wait
    .code:004021BA                 mov     ax, word_40105C
    .code:004021C0                 or      ax, 0FF3Fh
    .code:004021C4                 mov     word_40105E, ax
    .code:004021CA                 fldcw   word_40105E
    .code:004021D0                 wait
    .code:004021D1                 fld     dword ptr [ebp+8]
    .code:004021D4                 frndint
    .code:004021D6                 fldcw   word_40105C
    .code:004021DC                 wait
    .code:004021DD                 fistp   dword_40106C
    .code:004021E3                 mov     eax, dword_40106C
    .code:004021E8                 leave
    .code:004021E9                 retn    4
    .code:004021EC ; ---------------------------------------------------------------------------
    .code:004021EC                 push    ebp
    .code:004021ED                 mov     ebp, esp
    .code:004021EF                 lea     eax, [ebp+8]
    .code:004021F5                 mov     eax, [eax]
    .code:004021F7                 push    eax
    .code:004021F8                 call    sub_402142
    .code:004021FD                 mov     dword_401078, eax
    .code:00402202                 lea     eax, [ebp+8]
    .code:00402208                 mov     eax, [eax]
    .code:0040220A                 push    eax
    .code:0040220B                 call    sub_40216D
    .code:00402210                 mov     dword_401008, eax
    .code:00402215                 mov     eax, 0
    .code:0040221A                 mov     dword_40100C, eax
    .code:0040221F                 mov     eax, dword_401008
    .code:00402224                 mov     edx, dword_40100C
    .code:0040222A                 cmp     eax, edx
    .code:0040222C                 jge     loc_40223D
    .code:00402232                 dec     dword_401078
    .code:00402238                 jmp     $+5
    .code:0040223D
    .code:0040223D loc_40223D:                             ; CODE XREF: .code:0040222Cj
    .code:0040223D                 mov     eax, dword_401078
    .code:00402242                 mov     dword_401020, eax
    .code:00402247                 push    dword_401020
    .code:0040224D                 jmp     $+5
    .code:00402252                 leave
    .code:00402253                 retn    4
    .code:00402256 ; ---------------------------------------------------------------------------
    .code:00402256                 push    ebp
    .code:00402257                 mov     ebp, esp
    .code:00402259                 lea     eax, [ebp+8]
    .code:0040225F                 mov     eax, [eax]
    .code:00402261                 push    eax
    .code:00402262                 call    sub_402142
    .code:00402267                 mov     dword_40107C, eax
    .code:0040226C                 lea     eax, [ebp+8]
    .code:00402272                 mov     eax, [eax]
    .code:00402274                 push    eax
    .code:00402275                 call    sub_40216D
    .code:0040227A                 mov     dword_401008, eax
    .code:0040227F                 mov     eax, 0
    .code:00402284                 mov     dword_40100C, eax
    .code:00402289                 mov     eax, dword_401008
    .code:0040228E                 mov     edx, dword_40100C
    .code:00402294                 cmp     eax, edx
    .code:00402296                 jle     loc_4022A7
    .code:0040229C                 inc     dword_40107C
    .code:004022A2                 jmp     $+5
    .code:004022A7
    .code:004022A7 loc_4022A7:                             ; CODE XREF: .code:00402296j
    .code:004022A7                 mov     eax, dword_40107C
    .code:004022AC                 mov     dword_401020, eax
    .code:004022B1                 push    dword_401020
    .code:004022B7                 jmp     $+5
    .code:004022BC                 leave
    .code:004022BD                 retn    4
    .code:004022C0 ; ---------------------------------------------------------------------------
    .code:004022C0                 push    ebp
    .code:004022C1                 mov     ebp, esp
    .code:004022C3                 fld     dword ptr [ebp+8]
    .code:004022C6                 fabs
    .code:004022C8                 fstp    flt_401068
    .code:004022CE                 mov     eax, flt_401068
    .code:004022D3                 leave
    .code:004022D4                 retn    4
    .code:004022D7 ; ---------------------------------------------------------------------------
    .code:004022D7                 push    ebp
    .code:004022D8                 mov     ebp, esp
    .code:004022DA                 fld     dword ptr [ebp+8]
    .code:004022DD                 fsqrt
    .code:004022DF                 fstp    flt_401068
    .code:004022E5                 mov     eax, flt_401068
    .code:004022EA                 leave
    .code:004022EB                 retn    4
    .code:004022EE
    .code:004022EE ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:004022EE
    .code:004022EE ; Attributes: bp-based frame
    .code:004022EE
    .code:004022EE sub_4022EE      proc near               ; CODE XREF: .code:0040241Ap
    .code:004022EE
    .code:004022EE arg_0           = dword ptr  8
    .code:004022EE
    .code:004022EE                 push    ebp
    .code:004022EF                 mov     ebp, esp
    .code:004022F1                 fldln2
    .code:004022F3                 fld     [ebp+arg_0]
    .code:004022F6                 fyl2x
    .code:004022F8                 fstp    flt_401068
    .code:004022FE                 mov     eax, flt_401068
    .code:00402303                 leave
    .code:00402304                 retn    4
    .code:00402304 sub_4022EE      endp
    .code:00402304
    .code:00402307 ; ---------------------------------------------------------------------------
    .code:00402307                 push    ebp
    .code:00402308                 mov     ebp, esp
    .code:0040230A                 fldlg2
    .code:0040230C                 fld     dword ptr [ebp+8]
    .code:0040230F                 fyl2x
    .code:00402311                 fstp    flt_401068
    .code:00402317                 mov     eax, flt_401068
    .code:0040231C                 leave
    .code:0040231D                 retn    4
    .code:00402320 ; ---------------------------------------------------------------------------
    .code:00402320                 push    ebp
    .code:00402321                 mov     ebp, esp
    .code:00402323                 fld1
    .code:00402325                 fld     dword ptr [ebp+8]
    .code:00402328                 fyl2x
    .code:0040232A                 fstp    flt_401068
    .code:00402330                 mov     eax, flt_401068
    .code:00402335                 leave
    .code:00402336                 retn    4
    .code:00402339 ; ---------------------------------------------------------------------------
    .code:00402339                 push    ebp
    .code:0040233A                 mov     ebp, esp
    .code:0040233C                 fld1
    .code:0040233E                 fld     dword ptr [ebp+0Ch]
    .code:00402341                 fyl2x
    .code:00402343                 fld1
    .code:00402345                 fld     dword ptr [ebp+8]
    .code:00402348                 fyl2x
    .code:0040234A                 fdivp   st(1), st
    .code:0040234C                 fstp    flt_401068
    .code:00402352                 mov     eax, flt_401068
    .code:00402357                 leave
    .code:00402358                 retn    8
    .code:0040235B
    .code:0040235B ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:0040235B
    .code:0040235B ; Attributes: bp-based frame
    .code:0040235B
    .code:0040235B sub_40235B      proc near               ; CODE XREF: .code:0040245Ap
    .code:0040235B
    .code:0040235B arg_0           = dword ptr  8
    .code:0040235B
    .code:0040235B                 push    ebp
    .code:0040235C                 mov     ebp, esp
    .code:0040235E                 fld     [ebp+arg_0]
    .code:00402361                 fldl2e
    .code:00402363                 fmulp   st(1), st
    .code:00402365                 fst     st(1)
    .code:00402367                 frndint
    .code:00402369                 fsub    st(1), st
    .code:0040236B                 fxch    st(1)
    .code:0040236D                 f2xm1
    .code:0040236F                 fld1
    .code:00402371                 faddp   st(1), st
    .code:00402373                 fscale
    .code:00402375                 fstp    st(1)
    .code:00402377                 fstp    flt_401068
    .code:0040237D                 mov     eax, flt_401068
    .code:00402382                 leave
    .code:00402383                 retn    4
    .code:00402383 sub_40235B      endp
    .code:00402383
    .code:00402386 ; ---------------------------------------------------------------------------
    .code:00402386                 push    ebp
    .code:00402387                 mov     ebp, esp
    .code:00402389                 lea     eax, [ebp+8]
    .code:0040238F                 mov     eax, [eax]
    .code:00402391                 mov     dword_401008, eax
    .code:00402396                 mov     eax, 0
    .code:0040239B                 mov     dword_40100C, eax
    .code:004023A0                 mov     eax, dword_401008
    .code:004023A5                 mov     edx, dword_40100C
    .code:004023AB                 cmp     eax, edx
    .code:004023AD                 jnz     loc_4023CD
    .code:004023B3                 mov     eax, 0
    .code:004023B8                 mov     dword_401020, eax
    .code:004023BD                 push    dword_401020
    .code:004023C3                 jmp     locret_402543
    .code:004023C8 ; ---------------------------------------------------------------------------
    .code:004023C8                 jmp     $+5
    .code:004023CD
    .code:004023CD loc_4023CD:                             ; CODE XREF: .code:004023ADj
    .code:004023CD                 lea     eax, [ebp+0Ch]
    .code:004023D3                 mov     eax, [eax]
    .code:004023D5                 mov     dword_401008, eax
    .code:004023DA                 mov     eax, 0
    .code:004023DF                 mov     dword_40100C, eax
    .code:004023E4                 mov     eax, dword_401008
    .code:004023E9                 mov     edx, dword_40100C
    .code:004023EF                 cmp     eax, edx
    .code:004023F1                 jnz     loc_402411
    .code:004023F7                 mov     eax, 3F800000h
    .code:004023FC                 mov     dword_401020, eax
    .code:00402401                 push    dword_401020
    .code:00402407                 jmp     locret_402543
    .code:0040240C ; ---------------------------------------------------------------------------
    .code:0040240C                 jmp     $+5
    .code:00402411
    .code:00402411 loc_402411:                             ; CODE XREF: .code:004023F1j
    .code:00402411                 lea     eax, [ebp+8]
    .code:00402417                 mov     eax, [eax]
    .code:00402419                 push    eax
    .code:0040241A                 call    sub_4022EE
    .code:0040241F                 push    eax
    .code:00402420                 lea     eax, [ebp+0Ch]
    .code:00402426                 mov     eax, [eax]
    .code:00402428                 push    eax
    .code:00402429                 pop     edx
    .code:0040242A                 pop     eax
    .code:0040242B                 mov     dword_401084, eax
    .code:00402430                 fld     dword_401084
    .code:00402436                 mov     dword_401088, edx
    .code:0040243C                 fld     dword_401088
    .code:00402442                 fmulp   st(1), st
    .code:00402444                 fstp    flt_401010
    .code:0040244A                 mov     eax, flt_401010
    .code:0040244F                 mov     dword_401080, eax
    .code:00402454                 mov     eax, dword_401080
    .code:00402459                 push    eax
    .code:0040245A                 call    sub_40235B
    .code:0040245F                 mov     dword_401080, eax
    .code:00402464                 lea     eax, [ebp+8]
    .code:0040246A                 mov     eax, [eax]
    .code:0040246C                 mov     dword_401008, eax
    .code:00402471                 mov     eax, 0
    .code:00402476                 mov     dword_40100C, eax
    .code:0040247B                 mov     eax, dword_401008
    .code:00402480                 mov     edx, dword_40100C
    .code:00402486                 cmp     eax, edx
    .code:00402488                 jge     loc_4024C9
    .code:0040248E                 mov     eax, dword_401080
    .code:00402493                 push    eax
    .code:00402494                 push    0BF800000h
    .code:00402499                 pop     edx
    .code:0040249A                 pop     eax
    .code:0040249B                 mov     dword_40108C, eax
    .code:004024A0                 fld     dword_40108C
    .code:004024A6                 mov     dword_401090, edx
    .code:004024AC                 fld     dword_401090
    .code:004024B2                 fmulp   st(1), st
    .code:004024B4                 fstp    flt_401010
    .code:004024BA                 mov     eax, flt_401010
    .code:004024BF                 mov     dword_401080, eax
    .code:004024C4                 jmp     $+5
    .code:004024C9
    .code:004024C9 loc_4024C9:                             ; CODE XREF: .code:00402488j
    .code:004024C9                 lea     eax, [ebp+0Ch]
    .code:004024CF                 mov     eax, [eax]
    .code:004024D1                 mov     dword_401008, eax
    .code:004024D6                 mov     eax, 0
    .code:004024DB                 mov     dword_40100C, eax
    .code:004024E0                 mov     eax, dword_401008
    .code:004024E5                 mov     edx, dword_40100C
    .code:004024EB                 cmp     eax, edx
    .code:004024ED                 jge     loc_40252E
    .code:004024F3                 push    3F800000h
    .code:004024F8                 mov     eax, dword_401080
    .code:004024FD                 push    eax
    .code:004024FE                 pop     edx
    .code:004024FF                 pop     eax
    .code:00402500                 mov     dword_401094, eax
    .code:00402505                 fld     dword_401094
    .code:0040250B                 mov     dword_401098, edx
    .code:00402511                 fld     dword_401098
    .code:00402517                 fdivp   st(1), st
    .code:00402519                 fstp    flt_401010
    .code:0040251F                 mov     eax, flt_401010
    .code:00402524                 mov     dword_401080, eax
    .code:00402529                 jmp     $+5
    .code:0040252E
    .code:0040252E loc_40252E:                             ; CODE XREF: .code:004024EDj
    .code:0040252E                 mov     eax, dword_401080
    .code:00402533                 mov     dword_401020, eax
    .code:00402538                 push    dword_401020
    .code:0040253E                 jmp     $+5
    .code:00402543
    .code:00402543 locret_402543:                          ; CODE XREF: .code:004023C3j
    .code:00402543                                         ; .code:00402407j
    .code:00402543                 leave
    .code:00402544                 retn    8
    .code:00402547 ; ---------------------------------------------------------------------------
    .code:00402547                 push    ebp
    .code:00402548                 mov     ebp, esp
    .code:0040254A                 push    offset unk_40109C
    .code:0040254F                 push    offset dword_401036
    .code:00402554                 call    ds:lstrcpyA
    .code:0040255A                 push    dword_401036
    .code:00402560                 pop     eax
    .code:00402561                 mov     dword_401036, eax
    .code:00402566                 push    offset aLdC     ; "%ld%c"
    .code:0040256B                 push    offset dword_401024
    .code:00402570                 call    ds:lstrcpyA
    .code:00402576                 push    dword_401024
    .code:0040257C                 pop     eax
    .code:0040257D                 mov     dword_401024, eax
    .code:00402582                 push    0
    .code:00402587                 lea     eax, [ebp+8]
    .code:0040258D                 mov     eax, [eax]
    .code:0040258F                 push    eax
    .code:00402590                 push    offset dword_401024
    .code:00402595                 push    offset dword_401036
    .code:0040259A                 call    ds:sprintf
    .code:004025A0                 mov     eax, offset dword_401036
    .code:004025A5                 mov     dword_401020, eax
    .code:004025AA                 push    dword_401020
    .code:004025B0                 jmp     $+5
    .code:004025B5                 leave
    .code:004025B6                 retn    4
    .code:004025B9 ; ---------------------------------------------------------------------------
    .code:004025B9                 push    ebp
    .code:004025BA                 mov     ebp, esp
    .code:004025BC                 push    offset unk_4010A4
    .code:004025C1                 push    offset dword_401036
    .code:004025C6                 call    ds:lstrcpyA
    .code:004025CC                 push    dword_401036
    .code:004025D2                 pop     eax
    .code:004025D3                 mov     dword_401036, eax
    .code:004025D8                 push    offset aLuC     ; "%lu%c"
    .code:004025DD                 push    offset dword_401024
    .code:004025E2                 call    ds:lstrcpyA
    .code:004025E8                 push    dword_401024
    .code:004025EE                 pop     eax
    .code:004025EF                 mov     dword_401024, eax
    .code:004025F4                 push    0
    .code:004025F9                 lea     eax, [ebp+8]
    .code:004025FF                 mov     eax, [eax]
    .code:00402601                 push    eax
    .code:00402602                 push    offset dword_401024
    .code:00402607                 push    offset dword_401036
    .code:0040260C                 call    ds:sprintf
    .code:00402612                 mov     eax, offset dword_401036
    .code:00402617                 mov     dword_401020, eax
    .code:0040261C                 push    dword_401020
    .code:00402622                 jmp     $+5
    .code:00402627                 leave
    .code:00402628                 retn    4
    .code:0040262B
    .code:0040262B ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:0040262B
    .code:0040262B ; Attributes: bp-based frame
    .code:0040262B
    .code:0040262B sub_40262B      proc near               ; CODE XREF: .code:004026B5p
    .code:0040262B
    .code:0040262B arg_0           = dword ptr  8
    .code:0040262B
    .code:0040262B                 push    ebp
    .code:0040262C                 mov     ebp, esp
    .code:0040262E                 push    offset String2  ; lpString2
    .code:00402633                 push    offset dword_401036 ; lpString1
    .code:00402638                 call    ds:lstrcpyA
    .code:0040263E                 push    dword_401036
    .code:00402644                 pop     eax
    .code:00402645                 mov     dword_401036, eax
    .code:0040264A                 push    offset aFC      ; "%f%c"
    .code:0040264F                 push    offset dword_401024 ; lpString1
    .code:00402654                 call    ds:lstrcpyA
    .code:0040265A                 push    dword_401024
    .code:00402660                 pop     eax
    .code:00402661                 mov     dword_401024, eax
    .code:00402666                 fld     [ebp+arg_0]
    .code:00402669                 fstp    dbl_401060
    .code:0040266F                 push    0
    .code:00402674                 mov     eax, dword ptr dbl_401060+4
    .code:00402679                 push    eax
    .code:0040267A                 mov     eax, dword ptr dbl_401060
    .code:0040267F                 push    eax
    .code:00402680                 push    offset dword_401024 ; char *
    .code:00402685                 push    offset dword_401036 ; char *
    .code:0040268A                 call    ds:sprintf
    .code:00402690                 mov     eax, offset dword_401036
    .code:00402695                 mov     dword_401020, eax
    .code:0040269A                 push    dword_401020
    .code:004026A0                 jmp     $+5
    .code:004026A5                 leave
    .code:004026A6                 retn    4
    .code:004026A6 sub_40262B      endp
    .code:004026A6
    .code:004026A9 ; ---------------------------------------------------------------------------
    .code:004026A9                 push    ebp
    .code:004026AA                 mov     ebp, esp
    .code:004026AC                 lea     eax, [ebp+8]
    .code:004026B2                 mov     eax, [eax]
    .code:004026B4                 push    eax
    .code:004026B5                 call    sub_40262B
    .code:004026BA                 mov     dword_401020, eax
    .code:004026BF                 push    dword_401020
    .code:004026C5                 jmp     $+5
    .code:004026CA                 leave
    .code:004026CB                 retn    4
    .code:004026CE ; ---------------------------------------------------------------------------
    .code:004026CE                 push    ebp
    .code:004026CF                 mov     ebp, esp
    .code:004026D1                 lea     eax, [ebp+8]
    .code:004026D7                 mov     eax, [eax]
    .code:004026D9                 push    eax
    .code:004026DA                 call    sub_402142
    .code:004026DF                 mov     dword_401020, eax
    .code:004026E4                 push    dword_401020
    .code:004026EA                 jmp     $+5
    .code:004026EF                 leave
    .code:004026F0                 retn    4
    .code:004026F3 ; ---------------------------------------------------------------------------
    .code:004026F3                 push    ebp
    .code:004026F4                 mov     ebp, esp
    .code:004026F6                 lea     eax, [ebp+8]
    .code:004026FC                 mov     eax, [eax]
    .code:004026FE                 push    eax
    .code:004026FF                 call    sub_4020F0
    .code:00402704                 mov     dword_401020, eax
    .code:00402709                 push    dword_401020
    .code:0040270F                 jmp     $+5
    .code:00402714                 leave
    .code:00402715                 retn    4
    .code:00402718
    .code:00402718 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:00402718
    .code:00402718 ; Attributes: bp-based frame
    .code:00402718
    .code:00402718 sub_402718      proc near               ; CODE XREF: .code:004027A4p
    .code:00402718
    .code:00402718 arg_0           = dword ptr  8
    .code:00402718
    .code:00402718                 push    ebp
    .code:00402719                 mov     ebp, esp
    .code:0040271B                 lea     eax, [ebp+arg_0]
    .code:00402721                 mov     eax, [eax]
    .code:00402723                 push    eax             ; lpSrc
    .code:00402724                 call    ds:StrToIntA
    .code:0040272A                 mov     dword_401020, eax
    .code:0040272F                 push    dword_401020
    .code:00402735                 jmp     $+5
    .code:0040273A                 leave
    .code:0040273B                 retn    4
    .code:0040273B sub_402718      endp
    .code:0040273B
    .code:0040273E
    .code:0040273E ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:0040273E
    .code:0040273E ; Attributes: bp-based frame
    .code:0040273E
    .code:0040273E sub_40273E      proc near               ; CODE XREF: .code:0040277Fp
    .code:0040273E
    .code:0040273E arg_0           = dword ptr  8
    .code:0040273E
    .code:0040273E                 push    ebp
    .code:0040273F                 mov     ebp, esp
    .code:00402741                 lea     eax, [ebp+arg_0]
    .code:00402747                 mov     eax, [eax]
    .code:00402749                 push    eax
    .code:0040274A                 push    offset aD       ; "%d"
    .code:0040274F                 push    offset byte_4010B3 ; LPSTR
    .code:00402754                 call    ds:wsprintfA
    .code:0040275A                 mov     eax, offset byte_4010B3
    .code:0040275F                 mov     dword_401020, eax
    .code:00402764                 push    dword_401020
    .code:0040276A                 jmp     $+5
    .code:0040276F                 leave
    .code:00402770                 retn    4
    .code:00402770 sub_40273E      endp
    .code:00402770
    .code:00402773 ; ---------------------------------------------------------------------------
    .code:00402773                 push    ebp
    .code:00402774                 mov     ebp, esp
    .code:00402776                 lea     eax, [ebp+8]
    .code:0040277C                 mov     eax, [eax]
    .code:0040277E                 push    eax
    .code:0040277F                 call    sub_40273E
    .code:00402784                 mov     dword_401020, eax
    .code:00402789                 push    dword_401020
    .code:0040278F                 jmp     $+5
    .code:00402794                 leave
    .code:00402795                 retn    4
    .code:00402798 ; ---------------------------------------------------------------------------
    .code:00402798                 push    ebp
    .code:00402799                 mov     ebp, esp
    .code:0040279B                 lea     eax, [ebp+8]
    .code:004027A1                 mov     eax, [eax]
    .code:004027A3                 push    eax
    .code:004027A4                 call    sub_402718
    .code:004027A9                 mov     dword_401020, eax
    .code:004027AE                 push    dword_401020
    .code:004027B4                 jmp     $+5
    .code:004027B9                 leave
    .code:004027BA                 retn    4
    .code:004027BD
    .code:004027BD ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:004027BD
    .code:004027BD ; Attributes: bp-based frame
    .code:004027BD
    .code:004027BD sub_4027BD      proc near               ; CODE XREF: sub_40280F+70p
    .code:004027BD
    .code:004027BD arg_0           = dword ptr  8
    .code:004027BD
    .code:004027BD                 push    ebp
    .code:004027BE                 mov     ebp, esp
    .code:004027C0                 lea     eax, [ebp+arg_0]
    .code:004027C6                 mov     eax, [eax]
    .code:004027C8                 push    eax
    .code:004027C9                 push    0FFFFh
    .code:004027CE                 pop     ebx
    .code:004027CF                 pop     eax
    .code:004027D0                 and     eax, ebx
    .code:004027D2                 mov     dword_401020, eax
    .code:004027D7                 push    dword_401020
    .code:004027DD                 jmp     $+5
    .code:004027E2                 leave
    .code:004027E3                 retn    4
    .code:004027E3 sub_4027BD      endp
    .code:004027E3
    .code:004027E6
    .code:004027E6 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:004027E6
    .code:004027E6 ; Attributes: bp-based frame
    .code:004027E6
    .code:004027E6 sub_4027E6      proc near               ; CODE XREF: sub_40280F+83p
    .code:004027E6
    .code:004027E6 arg_0           = dword ptr  8
    .code:004027E6
    .code:004027E6                 push    ebp
    .code:004027E7                 mov     ebp, esp
    .code:004027E9                 lea     eax, [ebp+arg_0]
    .code:004027EF                 mov     eax, [eax]
    .code:004027F1                 push    eax
    .code:004027F2                 push    10h
    .code:004027F7                 pop     ecx
    .code:004027F8                 pop     eax
    .code:004027F9                 shr     eax, cl
    .code:004027FB                 mov     dword_401020, eax
    .code:00402800                 push    dword_401020
    .code:00402806                 jmp     $+5
    .code:0040280B                 leave
    .code:0040280C                 retn    4
    .code:0040280C sub_4027E6      endp
    .code:0040280C
    .code:0040280F
    .code:0040280F ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:0040280F
    .code:0040280F ; Attributes: bp-based frame
    .code:0040280F
    .code:0040280F sub_40280F      proc near               ; DATA XREF: sub_4028DF+16o
    .code:0040280F
    .code:0040280F arg_0           = dword ptr  8
    .code:0040280F arg_4           = dword ptr  0Ch
    .code:0040280F arg_8           = dword ptr  10h
    .code:0040280F arg_C           = dword ptr  14h
    .code:0040280F
    .code:0040280F                 push    ebp
    .code:00402810                 mov     ebp, esp
    .code:00402812                 lea     eax, [ebp+arg_4]
    .code:00402818                 mov     eax, [eax]
    .code:0040281A                 mov     dword_401008, eax
    .code:0040281F                 mov     eax, 2
    .code:00402824                 mov     dword_40100C, eax
    .code:00402829                 mov     eax, dword_401008
    .code:0040282E                 mov     edx, dword_40100C
    .code:00402834                 cmp     eax, edx
    .code:00402836                 jnz     loc_40284C
    .code:0040283C                 push    0               ; nExitCode
    .code:00402841                 call    ds:PostQuitMessage
    .code:00402847                 jmp     $+5
    .code:0040284C
    .code:0040284C loc_40284C:                             ; CODE XREF: sub_40280F+27j
    .code:0040284C                 lea     eax, [ebp+arg_4]
    .code:00402852                 mov     eax, [eax]
    .code:00402854                 mov     dword_401008, eax
    .code:00402859                 mov     eax, 5
    .code:0040285E                 mov     dword_40100C, eax
    .code:00402863                 mov     eax, dword_401008
    .code:00402868                 mov     edx, dword_40100C
    .code:0040286E                 cmp     eax, edx
    .code:00402870                 jnz     loc_4028A1
    .code:00402876                 lea     eax, [ebp+arg_C]
    .code:0040287C                 mov     eax, [eax]
    .code:0040287E                 push    eax
    .code:0040287F                 call    sub_4027BD
    .code:00402884                 mov     dword_401211, eax
    .code:00402889                 lea     eax, [ebp+arg_C]
    .code:0040288F                 mov     eax, [eax]
    .code:00402891                 push    eax
    .code:00402892                 call    sub_4027E6
    .code:00402897                 mov     dword_401215, eax
    .code:0040289C                 jmp     $+5
    .code:004028A1
    .code:004028A1 loc_4028A1:                             ; CODE XREF: sub_40280F+61j
    .code:004028A1                 lea     eax, [ebp+arg_C]
    .code:004028A7                 mov     eax, [eax]
    .code:004028A9                 push    eax             ; lParam
    .code:004028AA                 lea     eax, [ebp+arg_8]
    .code:004028B0                 mov     eax, [eax]
    .code:004028B2                 push    eax             ; wParam
    .code:004028B3                 lea     eax, [ebp+arg_4]
    .code:004028B9                 mov     eax, [eax]
    .code:004028BB                 push    eax             ; Msg
    .code:004028BC                 lea     eax, [ebp+arg_0]
    .code:004028C2                 mov     eax, [eax]
    .code:004028C4                 push    eax             ; hWnd
    .code:004028C5                 call    ds:DefWindowProcA
    .code:004028CB                 mov     dword_401020, eax
    .code:004028D0                 push    dword_401020
    .code:004028D6                 jmp     $+5
    .code:004028DB                 leave
    .code:004028DC                 retn    10h
    .code:004028DC sub_40280F      endp
    .code:004028DC
    .code:004028DF
    .code:004028DF ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:004028DF
    .code:004028DF ; Attributes: bp-based frame
    .code:004028DF
    .code:004028DF sub_4028DF      proc near               ; CODE XREF: start+Dp
    .code:004028DF                 push    ebp
    .code:004028E0                 mov     ebp, esp
    .code:004028E2                 push    2
    .code:004028E7                 push    1
    .code:004028EC                 pop     ebx
    .code:004028ED                 pop     eax
    .code:004028EE                 or      eax, ebx
    .code:004028F0                 mov     WndClass.style, eax
    .code:004028F5                 mov     eax, offset sub_40280F
    .code:004028FA                 mov     WndClass.lpfnWndProc, eax
    .code:004028FF                 mov     eax, 0
    .code:00402904                 mov     WndClass.cbClsExtra, eax
    .code:00402909                 mov     eax, 0
    .code:0040290E                 mov     WndClass.cbWndExtra, eax
    .code:00402913                 mov     eax, 0
    .code:00402918                 mov     WndClass.hInstance, eax
    .code:0040291D                 push    7F00h           ; lpIconName
    .code:00402922                 push    0               ; hInstance
    .code:00402927                 call    ds:LoadIconA
    .code:0040292D                 mov     WndClass.hIcon, eax
    .code:00402932                 push    7F00h           ; lpCursorName
    .code:00402937                 push    0               ; hInstance
    .code:0040293C                 call    ds:LoadCursorA
    .code:00402942                 mov     WndClass.hCursor, eax
    .code:00402947                 mov     eax, 15h
    .code:0040294C                 mov     WndClass.hbrBackground, eax
    .code:00402951                 mov     eax, offset unk_401225
    .code:00402956                 mov     WndClass.lpszMenuName, eax
    .code:0040295B                 mov     eax, offset aDialogclass ; "DialogClass"
    .code:00402960                 mov     WndClass.lpszClassName, eax
    .code:00402965                 push    offset WndClass ; lpWndClass
    .code:0040296A                 call    ds:RegisterClassA
    .code:00402970                 push    0               ; lpParam
    .code:00402975                 mov     eax, hInstance
    .code:0040297A                 push    eax             ; hInstance
    .code:0040297B                 push    0               ; hMenu
    .code:00402980                 push    0               ; hWndParent
    .code:00402985                 push    258h            ; nHeight
    .code:0040298A                 push    258h            ; nWidth
    .code:0040298F                 push    0C8h            ; Y
    .code:00402994                 push    0C8h            ; X
    .code:00402999                 push    0
    .code:0040299E                 push    0C00000h
    .code:004029A3                 pop     ebx
    .code:004029A4                 pop     eax
    .code:004029A5                 or      eax, ebx
    .code:004029A7                 push    eax
    .code:004029A8                 push    80000h
    .code:004029AD                 pop     ebx
    .code:004029AE                 pop     eax
    .code:004029AF                 or      eax, ebx
    .code:004029B1                 push    eax
    .code:004029B2                 push    10000000h
    .code:004029B7                 pop     ebx
    .code:004029B8                 pop     eax
    .code:004029B9                 or      eax, ebx
    .code:004029BB                 push    eax
    .code:004029BC                 push    40000h
    .code:004029C1                 pop     ebx
    .code:004029C2                 pop     eax
    .code:004029C3                 or      eax, ebx
    .code:004029C5                 push    eax
    .code:004029C6                 push    20000h
    .code:004029CB                 pop     ebx
    .code:004029CC                 pop     eax
    .code:004029CD                 or      eax, ebx
    .code:004029CF                 push    eax             ; dwStyle
    .code:004029D0                 push    offset WindowName ; "XOR-Burn - Single Core Stress Test - mi"...
    .code:004029D5                 push    offset ClassName ; "DialogClass"
    .code:004029DA                 push    0               ; dwExStyle
    .code:004029DF                 call    ds:CreateWindowExA
    .code:004029E5                 mov     hWnd, eax
    .code:004029EA                 mov     eax, hWnd
    .code:004029EF                 push    eax             ; hWnd
    .code:004029F0                 call    ds:GetDC
    .code:004029F6                 mov     dword_401219, eax
    .code:004029FB                 push    0               ; lpThreadId
    .code:00402A00                 push    0               ; dwCreationFlags
    .code:00402A05                 push    0               ; lpParameter
    .code:00402A0A                 push    offset StartAddress ; lpStartAddress
    .code:00402A0F                 push    0               ; dwStackSize
    .code:00402A14                 push    0               ; lpThreadAttributes
    .code:00402A19                 call    ds:CreateThread
    .code:00402A1F
    .code:00402A1F loc_402A1F:                             ; CODE XREF: sub_4028DF+192j
    .code:00402A1F                 push    0               ; wMsgFilterMax
    .code:00402A24                 push    0               ; wMsgFilterMin
    .code:00402A29                 push    0               ; hWnd
    .code:00402A2E                 push    offset Msg      ; lpMsg
    .code:00402A33                 call    ds:GetMessageA
    .code:00402A39                 mov     dword_401008, eax
    .code:00402A3E                 mov     eax, 0
    .code:00402A43                 mov     dword_40100C, eax
    .code:00402A48                 mov     eax, dword_401008
    .code:00402A4D                 mov     edx, dword_40100C
    .code:00402A53                 cmp     eax, edx
    .code:00402A55                 jz      loc_402A76
    .code:00402A5B                 push    offset Msg      ; lpMsg
    .code:00402A60                 call    ds:TranslateMessage
    .code:00402A66                 push    offset Msg      ; lpMsg
    .code:00402A6B                 call    ds:DispatchMessageA
    .code:00402A71                 jmp     loc_402A1F
    .code:00402A76 ; ---------------------------------------------------------------------------
    .code:00402A76
    .code:00402A76 loc_402A76:                             ; CODE XREF: sub_4028DF+176j
    .code:00402A76                 push    0               ; hInstance
    .code:00402A7B                 push    offset aDialogclass_1 ; "DialogClass"
    .code:00402A80                 call    ds:UnregisterClassA
    .code:00402A86                 leave
    .code:00402A87                 retn    0
    .code:00402A87 sub_4028DF      endp
    .code:00402A87
    .code:00402A8A
    .code:00402A8A ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    .code:00402A8A
    .code:00402A8A ; Attributes: bp-based frame
    .code:00402A8A
    .code:00402A8A ; DWORD __stdcall StartAddress(LPVOID)
    .code:00402A8A StartAddress    proc near               ; DATA XREF: sub_4028DF+12Bo
    .code:00402A8A
    .code:00402A8A arg_0           = dword ptr  8
    .code:00402A8A arg_4           = dword ptr  0Ch
    .code:00402A8A
    .code:00402A8A                 push    ebp
    .code:00402A8B                 mov     ebp, esp
    .code:00402A8D
    .code:00402A8D loc_402A8D:                             ; CODE XREF: StartAddress:loc_402B7Fj
    .code:00402A8D                 mov     eax, 1
    .code:00402A92                 mov     dword_401008, eax
    .code:00402A97                 mov     eax, 2
    .code:00402A9C                 mov     dword_40100C, eax
    .code:00402AA1                 mov     eax, dword_401008
    .code:00402AA6                 mov     edx, dword_40100C
    .code:00402AAC                 cmp     eax, edx
    .code:00402AAE                 jge     locret_402B84
    .code:00402AB4                 mov     eax, 0
    .code:00402AB9                 mov     [ebp+arg_0], eax
    .code:00402ABF
    .code:00402ABF loc_402ABF:                             ; CODE XREF: StartAddress+F0j
    .code:00402ABF                 lea     eax, [ebp+arg_0]
    .code:00402AC5                 mov     eax, [eax]
    .code:00402AC7                 mov     dword_401008, eax
    .code:00402ACC                 mov     eax, 259h
    .code:00402AD1                 mov     dword_40100C, eax
    .code:00402AD6                 mov     eax, dword_401008
    .code:00402ADB                 mov     edx, dword_40100C
    .code:00402AE1                 cmp     eax, edx
    .code:00402AE3                 jge     loc_402B7F
    .code:00402AE9                 mov     eax, 0
    .code:00402AEE                 mov     [ebp+arg_4], eax
    .code:00402AF4
    .code:00402AF4 loc_402AF4:                             ; CODE XREF: StartAddress+DAj
    .code:00402AF4                 lea     eax, [ebp+arg_4]
    .code:00402AFA                 mov     eax, [eax]
    .code:00402AFC                 mov     dword_401008, eax
    .code:00402B01                 mov     eax, 259h
    .code:00402B06                 mov     dword_40100C, eax
    .code:00402B0B                 mov     eax, dword_401008
    .code:00402B10                 mov     edx, dword_40100C
    .code:00402B16                 cmp     eax, edx
    .code:00402B18                 jge     loc_402B69
    .code:00402B1E                 lea     eax, [ebp+arg_0]
    .code:00402B24                 mov     eax, [eax]
    .code:00402B26                 push    eax
    .code:00402B27                 lea     eax, [ebp+arg_4]
    .code:00402B2D                 mov     eax, [eax]
    .code:00402B2F                 push    eax
    .code:00402B30                 pop     edx
    .code:00402B31                 pop     eax
    .code:00402B32                 add     eax, edx
    .code:00402B34                 push    eax             ; COLORREF
    .code:00402B35                 lea     eax, [ebp+arg_4]
    .code:00402B3B                 mov     eax, [eax]
    .code:00402B3D                 push    eax             ; int
    .code:00402B3E                 lea     eax, [ebp+arg_0]
    .code:00402B44                 mov     eax, [eax]
    .code:00402B46                 push    eax             ; int
    .code:00402B47                 mov     eax, dword_401219
    .code:00402B4C                 push    eax             ; HDC
    .code:00402B4D                 call    ds:SetPixel
    .code:00402B53                 mov     eax, [ebp+arg_4]
    .code:00402B59                 add     eax, 1
    .code:00402B5E                 mov     [ebp+arg_4], eax
    .code:00402B64                 jmp     loc_402AF4
    .code:00402B69 ; ---------------------------------------------------------------------------
    .code:00402B69
    .code:00402B69 loc_402B69:                             ; CODE XREF: StartAddress+8Ej
    .code:00402B69                 mov     eax, [ebp+arg_0]
    .code:00402B6F                 add     eax, 1
    .code:00402B74                 mov     [ebp+arg_0], eax
    .code:00402B7A                 jmp     loc_402ABF
    .code:00402B7F ; ---------------------------------------------------------------------------
    .code:00402B7F
    .code:00402B7F loc_402B7F:                             ; CODE XREF: StartAddress+59j
    .code:00402B7F                 jmp     loc_402A8D
    .code:00402B84 ; ---------------------------------------------------------------------------
    .code:00402B84
    .code:00402B84 locret_402B84:                          ; CODE XREF: StartAddress+24j
    .code:00402B84                 leave
    .code:00402B85                 retn    8
    .code:00402B85 StartAddress    endp
    .code:00402B85
    .code:00402B88 ; ---------------------------------------------------------------------------
    .code:00402B88                 push    ebp
    .code:00402B89                 mov     ebp, esp
    .code:00402B8B
    .code:00402B8B loc_402B8B:                             ; CODE XREF: .code:loc_402C7Dj
    .code:00402B8B                 mov     eax, 1
    .code:00402B90                 mov     dword_401008, eax
    .code:00402B95                 mov     eax, 2
    .code:00402B9A                 mov     dword_40100C, eax
    .code:00402B9F                 mov     eax, dword_401008
    .code:00402BA4                 mov     edx, dword_40100C
    .code:00402BAA                 cmp     eax, edx
    .code:00402BAC                 jge     locret_402C82
    .code:00402BB2                 mov     eax, 12Ch
    .code:00402BB7                 mov     [ebp+8], eax
    .code:00402BBD
    .code:00402BBD loc_402BBD:                             ; CODE XREF: .code:00402C78j
    .code:00402BBD                 lea     eax, [ebp+8]
    .code:00402BC3                 mov     eax, [eax]
    .code:00402BC5                 mov     dword_401008, eax
    .code:00402BCA                 mov     eax, 259h
    .code:00402BCF                 mov     dword_40100C, eax
    .code:00402BD4                 mov     eax, dword_401008
    .code:00402BD9                 mov     edx, dword_40100C
    .code:00402BDF                 cmp     eax, edx
    .code:00402BE1                 jge     loc_402C7D
    .code:00402BE7                 mov     eax, 0
    .code:00402BEC                 mov     [ebp+0Ch], eax
    .code:00402BF2
    .code:00402BF2 loc_402BF2:                             ; CODE XREF: .code:00402C62j
    .code:00402BF2                 lea     eax, [ebp+0Ch]
    .code:00402BF8                 mov     eax, [eax]
    .code:00402BFA                 mov     dword_401008, eax
    .code:00402BFF                 mov     eax, 12Dh
    .code:00402C04                 mov     dword_40100C, eax
    .code:00402C09                 mov     eax, dword_401008
    .code:00402C0E                 mov     edx, dword_40100C
    .code:00402C14                 cmp     eax, edx
    .code:00402C16                 jge     loc_402C67
    .code:00402C1C                 lea     eax, [ebp+8]
    .code:00402C22                 mov     eax, [eax]
    .code:00402C24                 push    eax
    .code:00402C25                 lea     eax, [ebp+0Ch]
    .code:00402C2B                 mov     eax, [eax]
    .code:00402C2D                 push    eax
    .code:00402C2E                 pop     edx
    .code:00402C2F                 pop     eax
    .code:00402C30                 add     eax, edx
    .code:00402C32                 push    eax
    .code:00402C33                 lea     eax, [ebp+0Ch]
    .code:00402C39                 mov     eax, [eax]
    .code:00402C3B                 push    eax
    .code:00402C3C                 lea     eax, [ebp+8]
    .code:00402C42                 mov     eax, [eax]
    .code:00402C44                 push    eax
    .code:00402C45                 mov     eax, dword_401219
    .code:00402C4A                 push    eax
    .code:00402C4B                 call    ds:SetPixel
    .code:00402C51                 mov     eax, [ebp+0Ch]
    .code:00402C57                 add     eax, 1
    .code:00402C5C                 mov     [ebp+0Ch], eax
    .code:00402C62                 jmp     loc_402BF2
    .code:00402C67 ; ---------------------------------------------------------------------------
    .code:00402C67
    .code:00402C67 loc_402C67:                             ; CODE XREF: .code:00402C16j
    .code:00402C67                 mov     eax, [ebp+8]
    .code:00402C6D                 add     eax, 1
    .code:00402C72                 mov     [ebp+8], eax
    .code:00402C78                 jmp     loc_402BBD
    .code:00402C7D ; ---------------------------------------------------------------------------
    .code:00402C7D
    .code:00402C7D loc_402C7D:                             ; CODE XREF: .code:00402BE1j
    .code:00402C7D                 jmp     loc_402B8B
    .code:00402C82 ; ---------------------------------------------------------------------------
    .code:00402C82
    .code:00402C82 locret_402C82:                          ; CODE XREF: .code:00402BACj
    .code:00402C82                 leave
    .code:00402C83                 retn    8
    .code:00402C86 ; ---------------------------------------------------------------------------
    .code:00402C86                 push    ebp
    .code:00402C87                 mov     ebp, esp
    .code:00402C89
    .code:00402C89 loc_402C89:                             ; CODE XREF: .code:loc_402D7Bj
    .code:00402C89                 mov     eax, 1
    .code:00402C8E                 mov     dword_401008, eax
    .code:00402C93                 mov     eax, 2
    .code:00402C98                 mov     dword_40100C, eax
    .code:00402C9D                 mov     eax, dword_401008
    .code:00402CA2                 mov     edx, dword_40100C
    .code:00402CA8                 cmp     eax, edx
    .code:00402CAA                 jge     locret_402D80
    .code:00402CB0                 mov     eax, 0
    .code:00402CB5                 mov     [ebp+8], eax
    .code:00402CBB
    .code:00402CBB loc_402CBB:                             ; CODE XREF: .code:00402D76j
    .code:00402CBB                 lea     eax, [ebp+8]
    .code:00402CC1                 mov     eax, [eax]
    .code:00402CC3                 mov     dword_401008, eax
    .code:00402CC8                 mov     eax, 12Dh
    .code:00402CCD                 mov     dword_40100C, eax
    .code:00402CD2                 mov     eax, dword_401008
    .code:00402CD7                 mov     edx, dword_40100C
    .code:00402CDD                 cmp     eax, edx
    .code:00402CDF                 jge     loc_402D7B
    .code:00402CE5                 mov     eax, 12Dh
    .code:00402CEA                 mov     [ebp+0Ch], eax
    .code:00402CF0
    .code:00402CF0 loc_402CF0:                             ; CODE XREF: .code:00402D60j
    .code:00402CF0                 lea     eax, [ebp+0Ch]
    .code:00402CF6                 mov     eax, [eax]
    .code:00402CF8                 mov     dword_401008, eax
    .code:00402CFD                 mov     eax, 259h
    .code:00402D02                 mov     dword_40100C, eax
    .code:00402D07                 mov     eax, dword_401008
    .code:00402D0C                 mov     edx, dword_40100C
    .code:00402D12                 cmp     eax, edx
    .code:00402D14                 jge     loc_402D65
    .code:00402D1A                 lea     eax, [ebp+8]
    .code:00402D20                 mov     eax, [eax]
    .code:00402D22                 push    eax
    .code:00402D23                 lea     eax, [ebp+0Ch]
    .code:00402D29                 mov     eax, [eax]
    .code:00402D2B                 push    eax
    .code:00402D2C                 pop     edx
    .code:00402D2D                 pop     eax
    .code:00402D2E                 add     eax, edx
    .code:00402D30                 push    eax
    .code:00402D31                 lea     eax, [ebp+0Ch]
    .code:00402D37                 mov     eax, [eax]
    .code:00402D39                 push    eax
    .code:00402D3A                 lea     eax, [ebp+8]
    .code:00402D40                 mov     eax, [eax]
    .code:00402D42                 push    eax
    .code:00402D43                 mov     eax, dword_401219
    .code:00402D48                 push    eax
    .code:00402D49                 call    ds:SetPixel
    .code:00402D4F                 mov     eax, [ebp+0Ch]
    .code:00402D55                 add     eax, 1
    .code:00402D5A                 mov     [ebp+0Ch], eax
    .code:00402D60                 jmp     loc_402CF0
    .code:00402D65 ; ---------------------------------------------------------------------------
    .code:00402D65
    .code:00402D65 loc_402D65:                             ; CODE XREF: .code:00402D14j
    .code:00402D65                 mov     eax, [ebp+8]
    .code:00402D6B                 add     eax, 1
    .code:00402D70                 mov     [ebp+8], eax
    .code:00402D76                 jmp     loc_402CBB
    .code:00402D7B ; ---------------------------------------------------------------------------
    .code:00402D7B
    .code:00402D7B loc_402D7B:                             ; CODE XREF: .code:00402CDFj
    .code:00402D7B                 jmp     loc_402C89
    .code:00402D80 ; ---------------------------------------------------------------------------
    .code:00402D80
    .code:00402D80 locret_402D80:                          ; CODE XREF: .code:00402CAAj
    .code:00402D80                 leave
    .code:00402D81                 retn    8
    .code:00402D84 ; ---------------------------------------------------------------------------
    .code:00402D84                 push    ebp
    .code:00402D85                 mov     ebp, esp
    .code:00402D87
    .code:00402D87 loc_402D87:                             ; CODE XREF: .code:loc_402E79j
    .code:00402D87                 mov     eax, 1
    .code:00402D8C                 mov     dword_401008, eax
    .code:00402D91                 mov     eax, 2
    .code:00402D96                 mov     dword_40100C, eax
    .code:00402D9B                 mov     eax, dword_401008
    .code:00402DA0                 mov     edx, dword_40100C
    .code:00402DA6                 cmp     eax, edx
    .code:00402DA8                 jge     locret_402E7E
    .code:00402DAE                 mov     eax, 12Ch
    .code:00402DB3                 mov     [ebp+8], eax
    .code:00402DB9
    .code:00402DB9 loc_402DB9:                             ; CODE XREF: .code:00402E74j
    .code:00402DB9                 lea     eax, [ebp+8]
    .code:00402DBF                 mov     eax, [eax]
    .code:00402DC1                 mov     dword_401008, eax
    .code:00402DC6                 mov     eax, 259h
    .code:00402DCB                 mov     dword_40100C, eax
    .code:00402DD0                 mov     eax, dword_401008
    .code:00402DD5                 mov     edx, dword_40100C
    .code:00402DDB                 cmp     eax, edx
    .code:00402DDD                 jge     loc_402E79
    .code:00402DE3                 mov     eax, 12Dh
    .code:00402DE8                 mov     [ebp+0Ch], eax
    .code:00402DEE
    .code:00402DEE loc_402DEE:                             ; CODE XREF: .code:00402E5Ej
    .code:00402DEE                 lea     eax, [ebp+0Ch]
    .code:00402DF4                 mov     eax, [eax]
    .code:00402DF6                 mov     dword_401008, eax
    .code:00402DFB                 mov     eax, 259h
    .code:00402E00                 mov     dword_40100C, eax
    .code:00402E05                 mov     eax, dword_401008
    .code:00402E0A                 mov     edx, dword_40100C
    .code:00402E10                 cmp     eax, edx
    .code:00402E12                 jge     loc_402E63
    .code:00402E18                 lea     eax, [ebp+8]
    .code:00402E1E                 mov     eax, [eax]
    .code:00402E20                 push    eax
    .code:00402E21                 lea     eax, [ebp+0Ch]
    .code:00402E27                 mov     eax, [eax]
    .code:00402E29                 push    eax
    .code:00402E2A                 pop     edx
    .code:00402E2B                 pop     eax
    .code:00402E2C                 add     eax, edx
    .code:00402E2E                 push    eax
    .code:00402E2F                 lea     eax, [ebp+0Ch]
    .code:00402E35                 mov     eax, [eax]
    .code:00402E37                 push    eax
    .code:00402E38                 lea     eax, [ebp+8]
    .code:00402E3E                 mov     eax, [eax]
    .code:00402E40                 push    eax
    .code:00402E41                 mov     eax, dword_401219
    .code:00402E46                 push    eax
    .code:00402E47                 call    ds:SetPixel
    .code:00402E4D                 mov     eax, [ebp+0Ch]
    .code:00402E53                 add     eax, 1
    .code:00402E58                 mov     [ebp+0Ch], eax
    .code:00402E5E                 jmp     loc_402DEE
    .code:00402E63 ; ---------------------------------------------------------------------------
    .code:00402E63
    .code:00402E63 loc_402E63:                             ; CODE XREF: .code:00402E12j
    .code:00402E63                 mov     eax, [ebp+8]
    .code:00402E69                 add     eax, 1
    .code:00402E6E                 mov     [ebp+8], eax
    .code:00402E74                 jmp     loc_402DB9
    .code:00402E79 ; ---------------------------------------------------------------------------
    .code:00402E79
    .code:00402E79 loc_402E79:                             ; CODE XREF: .code:00402DDDj
    .code:00402E79                 jmp     loc_402D87
    .code:00402E7E ; ---------------------------------------------------------------------------
    .code:00402E7E
    .code:00402E7E locret_402E7E:                          ; CODE XREF: .code:00402DA8j
    .code:00402E7E                 leave
    .code:00402E7F                 retn    8
    .code:00402E7F ; ---------------------------------------------------------------------------
    .code:00402E82                 align 200h
    .code:00402E82 _code           ends
    .code:00402E82
    .idata:00403078 ;
    .idata:00403078 ; Imports from KERNEL32.DLL
    .idata:00403078 ;
    .idata:00403078 ; Section 3. (virtual address 00003000)
    .idata:00403078 ; Virtual size                  : 00000228 (    552.)
    .idata:00403078 ; Section size in file          : 00000400 (   1024.)
    .idata:00403078 ; Offset to raw data for section: 00001600
    .idata:00403078 ; Flags C0000040: Data Readable Writable
    .idata:00403078 ; Alignment     : default
    .idata:00403078 ; ---------------------------------------------------------------------------
    .idata:00403078
    .idata:00403078 ; Segment type: Externs
    .idata:00403078 ; _idata
    .idata:00403078 ; LPSTR __stdcall lstrcpyA(LPSTR lpString1,LPCSTR lpString2)
    .idata:00403078                 extrn lstrcpyA:dword    ; DATA XREF: .code:00402554r
    .idata:00403078                                         ; .code:00402570r ...
    .idata:0040307C ; void __stdcall ExitProcess(UINT uExitCode)
    .idata:0040307C                 extrn ExitProcess:dword ; DATA XREF: start+17r
    .idata:00403080 ; HMODULE __stdcall GetModuleHandleA(LPCSTR lpModuleName)
    .idata:00403080                 extrn GetModuleHandleA:dword ; DATA XREF: start+2r
    .idata:00403084 ; HANDLE __stdcall CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes,DWORD dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId)
    .idata:00403084                 extrn CreateThread:dword ; DATA XREF: sub_4028DF+13Ar
    .idata:00403088
    .idata:0040308C ;
    .idata:0040308C ; Imports from USER32.DLL
    .idata:0040308C ;
    .idata:0040308C ; int wsprintfA(LPSTR,LPCSTR,...)
    .idata:0040308C                 extrn wsprintfA:dword   ; DATA XREF: sub_40273E+16r
    .idata:00403090 ; HWND __stdcall CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam)
    .idata:00403090                 extrn CreateWindowExA:dword ; DATA XREF: sub_4028DF+100r
    .idata:00403094 ; LRESULT __stdcall DefWindowProcA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)
    .idata:00403094                 extrn DefWindowProcA:dword ; DATA XREF: sub_40280F+B6r
    .idata:00403098 ; LONG __stdcall DispatchMessageA(const MSG *lpMsg)
    .idata:00403098                 extrn DispatchMessageA:dword ; DATA XREF: sub_4028DF+18Cr
    .idata:0040309C ; HDC __stdcall GetDC(HWND hWnd)
    .idata:0040309C                 extrn GetDC:dword       ; DATA XREF: sub_4028DF+111r
    .idata:004030A0 ; BOOL __stdcall GetMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax)
    .idata:004030A0                 extrn GetMessageA:dword ; DATA XREF: sub_4028DF+154r
    .idata:004030A4 ; HCURSOR __stdcall LoadCursorA(HINSTANCE hInstance,LPCSTR lpCursorName)
    .idata:004030A4                 extrn LoadCursorA:dword ; DATA XREF: sub_4028DF+5Dr
    .idata:004030A8 ; HICON __stdcall LoadIconA(HINSTANCE hInstance,LPCSTR lpIconName)
    .idata:004030A8                 extrn LoadIconA:dword   ; DATA XREF: sub_4028DF+48r
    .idata:004030AC ; void __stdcall PostQuitMessage(int nExitCode)
    .idata:004030AC                 extrn PostQuitMessage:dword ; DATA XREF: sub_40280F+32r
    .idata:004030B0 ; ATOM __stdcall RegisterClassA(const WNDCLASSA *lpWndClass)
    .idata:004030B0                 extrn RegisterClassA:dword ; DATA XREF: sub_4028DF+8Br
    .idata:004030B4 ; BOOL __stdcall TranslateMessage(const MSG *lpMsg)
    .idata:004030B4                 extrn TranslateMessage:dword ; DATA XREF: sub_4028DF+181r
    .idata:004030B8 ; BOOL __stdcall UnregisterClassA(LPCSTR lpClassName,HINSTANCE hInstance)
    .idata:004030B8                 extrn UnregisterClassA:dword ; DATA XREF: sub_4028DF+1A1r
    .idata:004030BC
    .idata:004030C0 ;
    .idata:004030C0 ; Imports from GDI32.DLL
    .idata:004030C0 ;
    .idata:004030C0 ; COLORREF __stdcall SetPixel(HDC,int,int,COLORREF)
    .idata:004030C0                 extrn SetPixel:dword    ; DATA XREF: StartAddress+C3r
    .idata:004030C0                                         ; .code:00402C4Br ...
    .idata:004030C4
    .idata:004030C8 ;
    .idata:004030C8 ; Imports from MSVCRT.DLL
    .idata:004030C8 ;
    .idata:004030C8 ; int sprintf(char *,const char *,...)
    .idata:004030C8                 extrn sprintf:dword     ; DATA XREF: .code:0040259Ar
    .idata:004030C8                                         ; .code:0040260Cr ...
    .idata:004030CC
    .idata:004030D0 ;
    .idata:004030D0 ; Imports from SHLWAPI.DLL
    .idata:004030D0 ;
    .idata:004030D0 ; int __stdcall StrToIntA(LPCSTR lpSrc)
    .idata:004030D0                 extrn StrToIntA:dword   ; DATA XREF: sub_402718+Cr
    .idata:004030D4
    .idata:004030D4
    .idata:004030D4
    .idata:004030D4                 end start
    Alles anzeigen
  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 29. Januar 2014 um 20:05

    eukalyptus hat mal wieder gerockt... :rock:
    Wie bereits gezeigt ist die Umwandlung von HEX nach BIN völlig zeitunkritisch!
    Die größte Zeit wird von DEC nach HEX benötigt. Mal sehen, ob mein Code, der (wie sehr schön von eukalyptus gezeigt) das vermeidbare DIV benutzt, einige Takte schneller ist.
    Ich hoffe, am Wochenende etwas verwertbares vorzeigen zu können^^

  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 26. Januar 2014 um 12:00

    Hi,
    habe das Hornerschema vom Papier nach AutoIt umgesetzt.
    Für die HEX-Darstellung (Basis 16) ist das Verfahren sogar recht fix, allerdings wird es bei Binär (Basis 2) recht zäh...kein Wunder, für jedes einzelne Bit muss der gesamte String durchgerechnet werden.
    Die HEX-"Umrechnung" kann man natürlich dahingehend optimieren, die Zahlen nicht zu dividieren und den Rest zu bestimmen, sondern direkt per LUT anzusprechen! Das werde ich in ASM umsetzen!

    Für die Berechnung könnte man eine Basis von bspw. 256 oder 1024 heranziehen,dann geht die Rechnerei noch schneller, allerdings kann man dann Aufgrund der Größe der benötigten LUT diese nicht mehr einsetzen...
    Dann bliebe die Berechnung, ich vermute stark, das ist immer noch langsamer als die Methode mit der LUT.
    Schaumamal...

    Spoiler anzeigen
    [autoit]

    ;umrechnung dezimalstring in hex und binär
    $dez = "123456789"

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To 5 ;bissl stringlänge aufbauen^^
    $dez &= $dez
    Next

    [/autoit] [autoit][/autoit] [autoit]

    $len = StringLen($dez)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $len = ' & $len & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $t = TimerInit()
    $hex = _DecToHex_16($dez)
    $m = TimerDiff($t)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hex = ' & $hex & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $m = ' & $m & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $t = TimerInit()
    $bin = _DecToBin($dez)
    $m = TimerDiff($t)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $bin = ' & $bin & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $m = ' & $m & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _DecToHex_16($dez)
    ;by Andy nach Hornerschema
    $basis = 16
    $len = StringLen($dez)
    If Mod($len, 2) Then ;wenn stringlänge nicht durch 2 teilbar
    $dez = "0" & $dez ;"0" vorne dranhängen
    $len += 1 ;länge anpassen
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $erg = "" ;ergebnis als Hex-string

    [/autoit] [autoit][/autoit] [autoit]

    While StringLen($dez) > 2 ;so lange, bis letzte Ziffer erreicht
    $rest = 0 ;rest der division
    $dez2 = "" ;neuer zahlenstring im zwischenspeicher
    $len = StringLen($dez) ;stringlänge
    If Mod($len, 2) Then ;wenn stringlänge nicht durch 2 teilbar
    $dez = "0" & $dez ;"0" vorne dranhängen
    $len += 1 ;länge anpassen
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To $len Step 2 ;den gesamten string durchlaufen
    $n = 100 * $rest + Number(StringMid($dez, $i, 2));zahl, die geteilt und geMODed werden muss
    $zahl = Int($n / $basis);DIV
    $u = "" ;zahl auffüllen auf 2 stellen
    If $zahl < 10 And $zahl > 0 Then $u = "0"
    $dez2 &= $u & String($zahl);neuer zahlenstring in zwischenspeicher
    $rest = Mod($n, $basis) ;rest der division
    Next
    $erg = Hex($rest, 1) & $erg ;ergebnis-hexstring
    $dez = $dez2 ;Zahlenstring aus zwischenspeicher
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Return "0x" & $erg

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_DecToHex_16

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _DecToBin($dez) ;string
    ;by Andy nach Hornerschema
    While StringLeft($dez, 1) = "0"
    $dez = StringTrimLeft($dez, 1)
    WEnd
    $basis = 2
    $len = StringLen($dez)
    $erg = "" ;ergebnis als Hex-string
    While StringLen($dez) > 0 ;so lange, bis letzte Ziffer erreicht
    $rest = 0 ;rest der division
    $dez2 = "" ;neuer zahlenstring im zwischenspeicher
    $len = StringLen($dez) ;stringlänge
    For $i = 1 To $len ;den gesamten string durchlaufen
    $n = 10 * $rest + Number(StringMid($dez, $i, 1));zahl, die geteilt und geMODed werden muss
    $zahl = Int($n / $basis);DIV
    $rest = Mod($n, $basis) ;rest der division
    $dez2 &= String($zahl) ;neuer zahlenstring in zwischenspeicher
    Next
    $erg = Hex($rest, 1) & $erg ;ergebnis-hexstring
    $dez = $dez2 ;Zahlenstring aus zwischenspeicher
    While StringLeft($dez, 1) = "0"
    $dez = StringTrimLeft($dez, 1)
    WEnd
    WEnd
    Return $erg

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_DecToBin

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 24. Januar 2014 um 07:21

    Wenn man unterstellt, dass die schnellste Methode darin besteht, mit Hilfe einer LUT aus der HEX-Darstellung die Binärdarstellung zu bekommen, sollte man ggf., um einfach die Anzahl zu berechnender "Binärziffern" zu reduzieren, die Dezimalzahl erst in HEX umwandeln. Beziehungsweise in ein Zahlenformat, welches "gerade so" in 32/64 Bit passt, also Basis 16^n.

    Habe mir hier das kaskadierte Hornerschema angeschaut, prinzipiell funktioniert das ja mit allen Basen (heisst das so? )

    Das "Problem" der Verwendung von Division und MOD würde ich ebenfalls in einer LUT abhandeln. Diese wäre dann abhängig von der Größe der Basis.
    Die Anzahl der Elemente innerhalb der LUT ergibt sich bei Basis 0xF mit 15 Einträgen, bei Basis 0xFF sind es schon 1599 Elemente , bei 0xFFFF 159999 Einträge usw.
    Somit hätte man bspw. bei Basis 16 um die Dezimalzahl 19912 in 0x4DC8 bzw. b100110111001000 "umzuwandeln" insgesamt nur 6 Zugriffe auf die LUT! Ohne bis auf eine Multiplikation pro Zugriff aufwändige Berechnungen!
    Bisher habe ich das mit Zettel und Bleistift durchgespielt, inwieweit der Aufwand mit sehr langen Strings skaliert, kann ich nicht abschätzen. Werde das mal in ein Script gießen 8o

  • Make-Grafik's Encryption Tool

    • Andy
    • 24. Januar 2014 um 06:30
    Zitat

    Also die Abhandlung ist komplett als Binary Datentyp, damit es keine Probleme mit nicht anzeigbaren Zeichen, oder Chr(0) en gibt. (AutoIt spinnt da manchmal etwas, aber als Binarys kann man so ziemlich alles abhandeln).

    AutoIt "spinnt" nicht mit dem NUL-Zeichen, viele Anwender haben blos keinerlei Ahnung, was es damit auf sich hat, der Bot soll ja einfach nur laufen....
    Chr(0) wird bei der ANZEIGE von Strings, wie in C, als Stringende-Zeichen interpretiert. Genau lesen, bei der ANZEIGE! (Msgbox, Consolewrite usw.)
    AutoIt ist sehr wohl in der Lage, mit den Stringfunktionen auch das Chr(0) zu behandeln. Extrem schnell übrigens....wenn man in der Lage ist, auch die Parameter der Funktionen richtig zu setzen (Case-sensitiv ftw! )

    [autoit]

    $string="ABC"&chr(0)&"DEFGHIJKLMNOPQRSTUVWXYZ"
    msgbox(0,"Stringlänge "&stringlen($string),$string)

    [/autoit][autoit][/autoit][autoit]

    $pos=stringinstr($string,chr(0),1)
    msgbox(0,"Position NUL-Zeichen",$pos)

    [/autoit][autoit][/autoit][autoit]

    $String=stringreplace($string,chr(0),"")
    msgbox(0,"NUL-Zeichen ersetzt, Stringlänge "&stringlen($string),$string)

    [/autoit]
  • Make-Grafik's Encryption Tool

    • Andy
    • 23. Januar 2014 um 13:29
    Zitat von Gandalf

    Die Sicherheit wird vermutlich stark reduziert wenn ich das Passwort mehrfach nutze alo mehrmals hintereinandern setze?

    Wenn du 500Kb Text verschlüsseln willst, kannst du natürlch 10x einen ZUFÄLLIGEN Schlüssel von 50Kb hintereinanderhängen. Ob es dann "extrem" Leicht ist, wie von Mars beschrieben, wage ich mal zu bezweifeln^^
    Wenn du allerdings 50000x einen Schlüssel von 1Kilobyte aneinanderhängst, wird es kritisch, verstanden?
    AES und Konsorten rotieren daher die Bits, um den "kurzen" Schlüssel sicherer zu machen.
    Imho Schwachsinnig, da angreifbar!
    Wer meint, diese Verfahren seien sicher, der betrachtet bitte die Entwicklung in den letzten 5 Jahren. Was vor einigen Jahren als "unknackbar" galt, wird heute von keinem einzigen Sicherheitsexperten mehr empfohlen!
    Problem ist die geistige unflexibilität der Entscheider in den großen Firmen, die haben vor 10 Jahren gelernt "ist sicher" und sehen deshalb absolut keine Notwendigkeit, dieses Verfahren heute nicht mehr einzusetzen....

  • Make-Grafik's Encryption Tool

    • Andy
    • 22. Januar 2014 um 21:28

    Hi,

    Zitat

    Die XOR-Verschlüsselung ist wie schon gesagt recht einfach zu entschlüsseln, wenn du ein sehr schlechtes Passwort benutzt (z.B. 1234).

    :rofl: Made my day....
    JEDE Verschlüsselung ist recht einfach zu entschlüsseln wenn man ein "schlechtes" Passwort nutzt!

    Gandalf

    Zitat

    War die aussage mit nachweislich nicht entschlüsselbar auf XOR oder das one time pad bezogen?

    Sowohl als auch.
    Wenn man bei der XOR-Verschlüsselung einen zufällig erzeugten Schlüssel in der Größe der zu verschlüsselnden Nachricht hat, dann ist JEDE mögliche Nachricht als Ergebnis mit einer weiteren XOR-Verknüpfung enthalten.
    Das heisst, per XOR kann ich mit vorhandenem Geheimtext und dem "passenden" Schlüssel JEDEN MÖGLICHEN KLARTEXT erzeugen.
    Natürlich erhalte ich, wenn ich die XOR-Methode brutforce, irgendwann den Klartext. Genau wie alle Zitate aus der Bibel oder die Notation von Mozarts Zauberflöte oder eine MP3 oder eine Bitmap mit dem Bild der Mona Lisa.
    Ob der so gefundene Klartext dem gesuchten Klartext entspricht, ist ohne den exakten Schlüssel nicht feststellbar!
    Daher ist XOR mit zufälligem Schlüssel in der Länge der Nachricht sicher.

  • XOR Verschlüsselung

    • Andy
    • 22. Januar 2014 um 20:19

    Hi,
    hier gibts ein Beispielscript.
    Und hier noch eins

    Verstecken ist besser als Verschlüsseln

  • Feuerrad

    • Andy
    • 21. Januar 2014 um 00:00

    :thumbup:
    Nach etlichem Drehen auf Platz 67 vorgedrungen :rock:

    Zitat

    da man ansonsten relativ einfach die Felder bestimmen kann.

    Ich kann ( will? ) die Felder nicht bestimmen, die niedrigen treffe ich aber häufiger. Das ist der Unterschied zwischen Zufall und Wahrscheinlichkeit. Die Wahrscheinlichkeit, dass ICH niedrige Felder drehe, liegt signifikant höher als Oskars "Zufallsalgorithmus" das vorgibt :D

  • includes als trojaner erkannt

    • Andy
    • 20. Januar 2014 um 23:46

    Hi,

    Zitat

    das heißt auch diesem programm kann man vertrauen? :

    Allein schon für diese Frage gehört dir eine Tracht Prügel, dass dir Hören und Sehen vergeht!

    "Medienkompetenz" heisst:
    KEINEM Programm kann man vertrauen. Egal aus welcher Quelle es kommt und welche Virenscanner "grün" zeigen.
    Selbst ein von dir geschriebenes Programm wird irgendwann ausführbar gemacht, sei es durch einen Compiler oder durch einen Interpreter.
    Und mal angenommen, du hast diesen Compiler Byte für Byte selbst in Maschinensprache gecoded, trifft das auch für das Betriebssystem und dessen API zu?
    Wer sagt dir, dass DEIN Programm nicht durch irgendwelche Bitfehler Code ausführt, den du garnicht beabsichtigt hast?

    Oben gesagtes trifft auch auf alle anderen Medien zu.
    Kennst du Googles Motto "Don´t be evil!" ?
    Stell dir vor, du könntest Milliarden damit verdienen indem du Daten unbemerkt sammelst (und weitergibst) oder alternativ in den Knast gehen weil du das publik machst, wie würdest DU dich entscheiden?

  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 20. Januar 2014 um 17:23

    Also wenn du das auf lange Strings anwenden willst, dann kannst du dich warm anziehen 8o
    DIE Challenge nehme ich an.
    Wird dann aber auch eine Funktion in einer Dll geben, so kann man sie auch in anderen Programmiersprachen nutzen.
    Nett wäre, wenn ein Interessierter die Funktion in C oder Compiler-Basic schreiben würde zum Vergleich.

  • Editfeld trotz @read_only klickbar

    • Andy
    • 20. Januar 2014 um 13:18

    Hi,

    Zitat

    Wie kann ich das verhindern ?

    indem man den Inhalt des Edit-Feldes ausliest und das "neue" darunterschreibt und dann den gesamten Text ins Edit einträgt.
    Edit-Felder sind zum editieren da, für Statusanzeigen gibt es eigene Controls, bspw. Label oder Statuszeilen.

  • Bedingung herausfinden bei If -> OR

    • Andy
    • 20. Januar 2014 um 13:12
    Zitat


    If $1 = False or $2 = False or $3 = False or $4 = False Then
    If $1 = False then _func1()
    If $2 = False then _func2()
    If $3 = False then _func3()
    If $4 = False then _func4()
    EndIf

    Alles anzeigen

    Die äußere IF-Bedingung brauchst du nicht, da doppelte Abfrage...
    Und wenn du nicht gerade 20 Funktionen aufrufst, würde ich die Abfrage so wie sie ist lassen. Das ist lesbar und leicht zu debuggen.
    Wenn du allerdings 20 Funktionen auf diese Art aufrufen musst, hast du in 90% aller Fälle ein strukturelles Problem in deinem Script. Da sollte man dann ansetzen.

  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 20. Januar 2014 um 00:40

    hehe, nützt alles nix....habe jetzt die Transformation IntToBin in 40 Takten hinbekommen...bringt aber garnix, weil der Overhead des DllCallAddress() und DllCall() viel zu hoch ist ;(

    Habe den ASM-Code 1:1 in meine im Assemblertut gezeigte Vorlage für eine Dll kopiert, Ctrl-F9 in FASMW, fertig.
    Dllcall ist etwa 20% langsamer als DllCallAddress() :D

    Ich benutze eine 2048 Byte lange Lookup-Tabelle LUT, welche aufeinanderfolgend die 8-Byte-Strings von 00000000 bis 11111111 (0x00 bis 0xFF) enthält.
    Hat man den Integer, bspw. 0x3B, dann ist die Adresse = Startadresse_LUT + ( 8 * 0x3B ) und man kann dann von dort den String "00111011" ins Ergebnis kopieren.
    Ich habe, um Speichertransfers soweit wie möglich einzusparen, die 4 Strings (a 64 Bit) in 2 SSE-Register kopiert.
    Mit bissl Code Verschachteln und Alignment kommt man auf ca. 30 Takte, fürs inlinen in einer Compilersprache sicher keine schlechte Sache^^

    Spoiler anzeigen
    [autoit]

    #AutoIt3Wrapper_UseX64=n ;wg AssembleIt, in der vorliegenden Version kann auch der 64-Bit-Modus verwendet werden
    ;#include "AssembleIt2.au3"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Assemblercode wandelt Integerzahl in Binärdarstellung

    [/autoit] [autoit][/autoit] [autoit]

    #cs int2dec
    use32 ;32-Bitmode

    [/autoit] [autoit][/autoit] [autoit]

    mov edi,[esp+4] ;integer
    mov edx,[esp+8] ;pointer auf Rückgabestring
    mov esi,[esp+12] ;pointer auf LUT

    [/autoit] [autoit][/autoit] [autoit]

    start:
    mov ebx,edi ;integer
    and ebx,0x000000FF ;bl maskieren 0xEF, leider kann man nicht [ESI+8*bl] schreiben
    movhpd xmm0,qword[esi+8*ebx] ;adressinhalt der 8 bytes "11101111" aus LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    mov ebx,edi ;integer
    shr ebx,8 ;nach bl schieben
    and ebx,0x000000FF ;bl maskieren
    movlpd xmm0,qword[esi+8*ebx] ;adressinhalt der 8 bytes aus LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    mov ebx,edi ;edi
    shr ebx,16 ;nach bl schieben
    and ebx,0x000000FF ;bl maskieren
    movhpd xmm1,qword[esi+8*ebx] ;adressinhalt der 8 bytes aus LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    mov ebx,edi ;edi
    shr ebx,24 ;nach bl schieben
    movlpd xmm1,qword[esi+8*ebx] ;adressinhalt der 8 bytes aus LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    movdqu dqword[edx],xmm1 ;erste 16 bytes ins ergebnis
    movdqu dqword[edx+16],xmm0 ;zweite 16 bytes ins ergebnis

    [/autoit] [autoit][/autoit] [autoit]

    ;ab hier stehen die 32 Bytes nullen und einsen im String

    [/autoit] [autoit][/autoit] [autoit]

    mov ecx,-1 ;erst ab der ersten 1 ausgeben
    schleife:
    add ecx,1 ;von byte 0 bis 31
    cmp ecx,31 ;31 bytes erreicht?
    je raus ;dann ist ecx+edx der pointer
    cmp byte [edx+ecx],'1' ;ist byte im Rückgabestring eine '1'?
    jne schleife ;wenn keine 1, dann nächstes byte im string

    [/autoit] [autoit][/autoit] [autoit]

    raus:
    add edx,ecx ;pointer auf erste 1 im string, ab dort darstellen
    mov eax,edx ;pointer auf rückgabestring zurückgeben

    [/autoit] [autoit][/autoit] [autoit]

    ret

    [/autoit] [autoit][/autoit] [autoit]

    #ce

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;assemblercode in den Speicher schreiben, die folgenden Zeilen wurden von AssembleIt() erstellt
    $ret_asm = "0x8B7C24048B5424088B74240C89FB81E3FF000000660F1604DE89FBC1EB0881E3FF000000660F1204DE89FBC1EB1081E3FF000000660F160CDE89FBC1EB18660F120CDEF30F7F0AF30F7F4210B9FFFFFFFF83C10183F91F7406803C0A3175F201CA89D0C3"

    [/autoit] [autoit][/autoit] [autoit]

    $struct_asm = DllStructCreate("byte[" & StringLen($ret_asm) / 2 - 1 & "]") ;platz für asmcode im speicher
    $ptr_asm = DllStructGetPtr($struct_asm) ;pointer asmcode
    DllStructSetData($struct_asm, 1, $ret_asm) ;asmcode in struct schreiben

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $struct_LUT = DllStructCreate("char[2048]") ;für asm
    Global $ptr_LUT = DllStructGetPtr($struct_LUT)
    _LUT_fuellen() ;für asm

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $int = 0xDEADBEEF ;integer

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;rückgabe
    $struct = DllStructCreate("char [32];int") ;32 Byte string plus Nullbyte als Stringende
    DllStructSetData($struct, 1, "00000000000000000000000000000000") ;string mit Nullen erstellen
    $addr = DllStructGetPtr($struct)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;~ $ret = _AssembleIt2("str*", "int2dec", "int", $int, "ptr", $addr, "ptr", $ptr_LUT)
    ;~ ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ret = ' & $ret & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;DllCallAddress()
    $ret = DllCallAddress("str*:cdecl", $ptr_asm, "int", $int, "ptr", $addr, "ptr", $ptr_LUT) ;int nach bin
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ret = ' & $ret[0] & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Dllcall()
    $dll = DllOpen("IntToBin.dll")
    $ret = DllCall($dll, "str*", "IntToBin", "int", $int, "ptr", $addr, "ptr", $ptr_LUT)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ret = ' & $ret[0] & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _LUT_fuellen() ;2048 Bytes LUT füllen
    $LUT = ""
    For $i = 0 To 255
    $bin = ''
    $value = $i
    Do
    $bin = Mod($value, 2) & $bin
    $value = Floor($value / 2)
    Until $value = 0
    $LUT &= StringLeft("00000000", 8 - StringLen($bin)) & $bin
    Next
    DllStructSetData($struct_LUT, 1, $LUT)
    EndFunc ;==>_LUT_fuellen

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist. die IntToBin.dll und auch AssembleIt2(), nur noch mit einem Overhead von 1 ms!

    Dllcode für FASMW.EXE

    Spoiler anzeigen
    [autoit]

    ; DLL creation example für WIN7 64
    ;
    ;1) Funktion erstellen in der section .text
    ; proc Funktionsname
    ; AssemblerCode....wie er in AutoIt lauffähig ist... hierhinkopieren
    ; endp
    ;
    ;2) In die section .edata den Funktionsnamen eintragen:
    ;export 'DLLNAME.DLL',\ ;Name der DLL-Datei
    ;Funktionsname1,'Funktionsname1',\ ;Funktionsnamen
    ;Funktionsname2,'Funktionsname2'
    ;
    ;3) *.asm-datei mit wfasm.exe oder fasm.exe compilieren (in FASMW.EXE laden und CTRL+F9 drücken)
    ;
    ;Aufruf aus AutoIt mit
    ;$ret=dllcall("dllname.dll","RückgabeTYP","Funktionsname","TYP",$parameter1)

    [/autoit] [autoit][/autoit] [autoit]

    format PE GUI 4.0 DLL
    entry DllEntryPoint

    [/autoit] [autoit][/autoit] [autoit]

    include 'win32a.inc' ;includes

    [/autoit] [autoit][/autoit] [autoit]

    ;einzubindende Librarys
    section '.idata' import data readable
    library kernel,'KERNEL32.DLL',\
    user,'USER32.DLL'

    [/autoit] [autoit][/autoit] [autoit]

    ;************Hier die in der DLL verwendeten Funktionen für den Export eintragen
    section '.edata' export data readable
    export 'IntToBin.DLL',\ ;Dateiname, Zeilentrenner ist ,\
    IntToBin,'IntToBin' ;letzte Funktion ohne das ,\

    [/autoit] [autoit][/autoit] [autoit]

    ;weitere Sektionen je nach Anforderung der Funktionen
    ;section '.data' data readable writeable

    [/autoit] [autoit][/autoit] [autoit]

    ;section für die Funktionen
    section '.code' code readable executable

    [/autoit] [autoit][/autoit] [autoit]

    ;DllEntryPoint wird beim Laden der DLL aufgerufen
    ;um "bombensicheres" Errorhandling zu haben, Funktion anpassen!
    proc DllEntryPoint hinstDLL,fdwReason,lpvReserved
    mov eax,TRUE ;hart aber herzlich^^
    ret
    endp

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;******************Ab hier fangen die Benutzer-Funktionen an **********

    [/autoit] [autoit][/autoit] [autoit]

    proc IntToBin

    [/autoit] [autoit][/autoit] [autoit]

    use32 ;32-Bitmode

    [/autoit] [autoit][/autoit] [autoit]

    mov edi,[esp+4] ;integer
    mov edx,[esp+8] ;pointer auf Rückgabestring
    mov esi,[esp+12] ;pointer auf LUT

    [/autoit] [autoit][/autoit] [autoit]

    start:
    mov ebx,edi ;integer
    and ebx,0x000000FF ;bl maskieren 0xEF
    movhpd xmm0,qword[esi+8*ebx] ;adressinhalt der 4 bytes "1110" in LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    mov ebx,edi ;integer
    shr ebx,8 ;nach bl schieben
    and ebx,0x000000FF ;bl maskieren
    movlpd xmm0,qword[esi+8*ebx] ;adressinhalt der 4 bytes in LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    mov ebx,edi ;edi
    shr ebx,16 ;nach bl schieben
    and ebx,0x000000FF ;bl maskieren 0
    movhpd xmm1,qword[esi+8*ebx] ;adressinhalt der 4 bytes in LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    mov ebx,edi ;edi
    shr ebx,24 ;nach bl schieben
    movlpd xmm1,qword[esi+8*ebx] ;adressinhalt der 4 bytes in LUT ins register

    [/autoit] [autoit][/autoit] [autoit]

    movdqu dqword[edx],xmm1 ;erste 16 bytes ins ergebnis
    movdqu dqword[edx+16],xmm0 ;zweite 16 bytes ins ergebnis

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    mov ecx,-1 ;erst ab der ersten 1 ausgeben
    schleife:
    add ecx,1
    cmp ecx,31 ;31 bytes erreicht?
    je raus ;dann ist ecx+edx der pointer
    cmp byte [edx+ecx],'1' ;ist byte im Rückgabestring eine '1'?
    jne schleife ;wenn keine 1, dann nächstes byte im string

    [/autoit] [autoit][/autoit] [autoit]

    raus:
    add edx,ecx ;pointer auf erste 1 im string, ab dort darstellen
    mov eax,edx ;pointer auf rückgabestring zurückgeben

    [/autoit] [autoit][/autoit] [autoit]

    ret 12

    [/autoit] [autoit][/autoit] [autoit]

    endp

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    section '.reloc' data discardable

    [/autoit] [autoit][/autoit] [autoit]

    data fixups
    if ~ $-$$
    dd 0,8 ;empty fixups section iff no other fixups
    end if
    end data

    [/autoit]

    Dateien

    IntToBin.zip 78,81 kB – 261 Downloads
  • Suche (schnelle) Funktion zum Umrechnen ins Dual- oder Hexadezimalsystem

    • Andy
    • 19. Januar 2014 um 16:16

    "Berechnet" wird in den "Array mit Optimierung"-Methoden sowieso nichts^^
    Da wird einfach über den eingegebenen Index in einem Array dessen Wert zurückgegeben.
    Schreibe diese "Werte" in eine LUT, greife per ASM darauf zu und du hast deinen 3-Zeiler :rofl:
    Schreibt man die LUT vorab in eine Struct, ist dllcalladdress bestimmt sauschnell 8o

    //EDIT habe AssembleIt2() übrigens von der Laufzeit extrem beschleunigt. Die dll wird nur noch einmal am Start des Scriptes geladen und somit nur gecalled. Damit reduziert sich ein _AssembleIt(Blablub....) auf ca 1-2ms...nicht schlecht, wenn man bedenkt, nun im ASM-code AutoIt-Variablen verwenden zu können^^

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™