Function at 0x402790
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Create thread
Delete file
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56880a
mov eax, dword fs:[0]
push eax
sub esp, 0x2b8
mov eax, dword [0x5cefc4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x21c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.0040a556
test eax, eax
jne 0x402800
push str.Fatal_Error:_MFC_initialization_failed_n
call fcn.00405380
add esp, 4
mov eax, 1
jmp 0x403ca8
push 1
push 0x402440
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x402819
or eax, 0xffffffff
jmp 0x403ca8
xor edi, edi
mov dword [ebp - 0x27c], 0
mov dword [ebp - 0x238], edi
mov dword [ebp - 0x278], 1
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403cc3
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x234], esi
mov dword [ebp - 4], edi
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403ccd
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x248], eax
mov byte [ebp - 4], 1
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403cd7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x244], edi
mov byte [ebp - 4], 2
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x230], 0
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403ce1
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x240], eax
mov byte [ebp - 4], 3
lea edx, [eax - 0x10]
cmp dword [edx + 4], 0
mov ecx, dword [edx]
mov dword [ebp - 0x224], ecx
je 0x40293a
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x402910
cmp dword [eax - 8], 0
jl 0x403ceb
xor ecx, ecx
mov dword [eax - 0xc], 0
mov word [eax], cx
jmp 0x40293a
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x402924
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x224]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x240], eax
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403cf5
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x23c], eax
mov byte [ebp - 4], 4
lea edx, [eax - 0x10]
cmp dword [edx + 4], 0
mov ecx, dword [edx]
mov dword [ebp - 0x224], ecx
je 0x4029b9
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x40298f
cmp dword [eax - 8], 0
jl 0x403cff
xor ecx, ecx
mov dword [eax - 0xc], 0
mov word [eax], cx
jmp 0x4029b9
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4029a3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x224]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x23c], eax
cmp dword [esi - 0xc], 0
lea edx, [esi - 0x10]
mov eax, dword [edx]
mov dword [ebp - 0x224], eax
je 0x402a15
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x4029eb
cmp dword [esi - 8], 0
jl 0x403cff
xor eax, eax
mov dword [esi - 0xc], 0
mov word [esi], ax
jmp 0x402a15
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4029ff
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x224]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x234], eax
cmp dword [edi - 0xc], 0
lea edx, [edi - 0x10]
mov esi, dword [edx]
je 0x402a67
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x402a41
cmp dword [edi - 8], 0
jl 0x403cff
xor eax, eax
mov dword [edi - 0xc], 0
mov word [edi], ax
jmp 0x402a67
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x402a55
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x244], eax
mov esi, 1
mov dword [ebp - 0x24c], 0x1c200
cmp dword [ebp + 8], esi
jle 0x402d86
nop
mov eax, dword [ebp - 0x21c]
lea edi, [esi*4]
push str._pac
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402aeb
lea eax, [esi + 1]
cmp eax, dword [ebp + 8]
jge 0x402d7c
mov esi, eax
mov eax, dword [ebp - 0x21c]
mov edx, dword [eax + esi*4]
test edx, edx
jne 0x402aca
xor ecx, ecx
push ecx
lea ecx, [ebp - 0x234]
jmp 0x402d76
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402ad0
sub ecx, edi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x234]
jmp 0x402d76
mov eax, dword [ebp - 0x21c]
push str._port
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402b2f
lea eax, [esi + 1]
cmp eax, dword [ebp + 8]
jge 0x402d7c
mov esi, eax
mov eax, dword [ebp - 0x21c]
push dword [eax + esi*4]
call fcn.0054ac68
add esp, 4
mov dword [ebp - 0x238], eax
jmp 0x402d7c
mov eax, dword [ebp - 0x21c]
push str._baudrate
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402b73
lea eax, [esi + 1]
cmp eax, dword [ebp + 8]
jge 0x402d7c
mov esi, eax
mov eax, dword [ebp - 0x21c]
push dword [eax + esi*4]
call fcn.0054ac68
add esp, 4
mov dword [ebp - 0x24c], eax
jmp 0x402d7c
mov eax, dword [ebp - 0x21c]
push str._count
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402bb7
lea eax, [esi + 1]
cmp eax, dword [ebp + 8]
jge 0x402d7c
mov esi, eax
mov eax, dword [ebp - 0x21c]
push dword [eax + esi*4]
call fcn.0054ac68
add esp, 4
mov dword [ebp - 0x278], eax
jmp 0x402d7c
mov eax, dword [ebp - 0x21c]
push str._ReadNV
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402c2d
lea eax, [esi + 1]
cmp eax, dword [ebp + 8]
jge 0x402d7c
mov esi, eax
mov dword [ebp - 0x27c], 1
mov eax, dword [ebp - 0x21c]
mov edx, dword [eax + esi*4]
test edx, edx
jne 0x402bfa
xor ecx, ecx
jmp 0x402c0f
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402c00
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x248]
call fcn.004021d0
push dword [ebp - 0x248]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402d7c
mov eax, dword [ebp - 0x21c]
push 0x5b11d4
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402c56
mov dword [ebp - 0x274], 1
jmp 0x402d7c
mov eax, dword [ebp - 0x21c]
push str._WriteSN
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x21c]
jne 0x402cc6
mov edx, dword [eax + edi + 4]
inc esi
mov dword [ebp - 0x228], 1
test edx, edx
jne 0x402c8d
xor ecx, ecx
jmp 0x402ca1
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402c92
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x23c]
call fcn.004021d0
push dword [ebp - 0x23c]
push str.WriteSN_arguments__s__n
call fcn.00405380
add esp, 8
jmp 0x402d7c
push str._WriteSN2
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x21c]
jne 0x402d31
mov edx, dword [eax + edi + 4]
inc esi
mov dword [ebp - 0x230], 1
test edx, edx
jne 0x402cf7
xor ecx, ecx
jmp 0x402d0f
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402d00
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x240]
call fcn.004021d0
push dword [ebp - 0x240]
push str.WriteSN2_arguments__s__n
call fcn.00405380
add esp, 8
jmp 0x402d7c
push str._timeout
push dword [edi + eax]
call fcn.00549a64
add esp, 8
test eax, eax
jne 0x402d7c
mov eax, dword [ebp - 0x21c]
inc esi
mov edx, dword [eax + esi*4]
test edx, edx
jne 0x402d57
xor ecx, ecx
jmp 0x402d6f
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402d60
sub ecx, edi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x244]
push edx
call fcn.004021d0
inc esi
cmp esi, dword [ebp + 8]
jl 0x402a80
mov esi, dword [ebp - 0x234]
cmp dword [esi - 0xc], 0
jne 0x402dc7
push str.Invalid_arguments_n
call fcn.00405380
push str.CmdDloader_Usage_n
call fcn.00405380
push str.CmdDloader.exe___pac_file____port_portnumber____ReadNV_nvfile__n
call fcn.00405380
push str.e.g.CmdDloader.exe__pac_d:_test.pac__port_5_n
call fcn.00405380
add esp, 0x10
mov edi, 1
jmp 0x403bff
lea ecx, [ebp - 0x2c4]
call fcn.0040a79b
push 0
push esi
lea ecx, [ebp - 0x2c4]
mov byte [ebp - 4], 5
call fcn.0040aa1a
test eax, eax
jne 0x402e29
push esi
push str.Invalid_arguments_Pac_file___s__dont_exist._n
call fcn.00405380
push str.CmdDloader_Usage_n
call fcn.00405380
push str.CmdDloader.exe___pac_file____port_portnumber____ReadNV_nvfile__n
call fcn.00405380
push str.e.g.CmdDloader.exe__pac_d:_test.pac__port_5_n
call fcn.00405380
add esp, 0x14
lea ecx, [ebp - 0x2c4]
call fcn.0040a947
mov edi, 1
jmp 0x403bff
lea ecx, [ebp - 0x2c4]
call fcn.0040a9c0
lea ecx, [ebp - 0x2c4]
mov byte [ebp - 4], 4
call fcn.0040a947
mov edi, dword [ebp - 0x244]
cmp dword [edi - 0xc], 0
je 0x402f1d
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00543520
lea ecx, [ebp - 0x224]
call fcn.00407480
push dword [eax]
lea eax, [ebp - 0x218]
push str._sCmdDloader.ini
push eax
call fcn.00402350
mov edx, dword [ebp - 0x224]
add esp, 0x18
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x402ea5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403d09
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x22c], eax
push edi
lea eax, [ebp - 0x22c]
mov byte [ebp - 4], 6
push str._s000
push eax
call fcn.004052b0
mov esi, dword [ebp - 0x22c]
lea eax, [ebp - 0x218]
add esp, 0xc
push eax
push esi
push str.WaitDUTTimeout
push str.Setting
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x402f17
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x234]
lea ecx, [ebp - 0x29c]
mov dword [ebp - method.CFindValidDut.virtual_0], vtable.CFindValidDut.0
call fcn.0040b086
push 0xffffffffffffffff
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x29c]
push 0
mov dword [ebp - 0x288], 0
call fcn.0040b3b8
lea eax, [ebp - 0x2a4]
push eax
call dword [sym.imp.PortHound.dll_CreateDevHound]
lea eax, [ebp - 0x2a0]
push 0
push eax
call dword [sym.imp.Channel9.dll_CreateChannel]
add esp, 0xc
lea ecx, [ebp - 0x2a8]
call fcn.00405f00
mov edi, dword [ebp - 0x238]
mov byte [ebp - 4], 8
test edi, edi
jne 0x4030c1
cmp dword [0x5d8118], edi
jne 0x402fad
push str.Detecting_download_device_...__n
call fcn.004053b0
push 1
call fcn.005493ab
push eax
call fcn.0054974c
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x220], eax
nop dword [eax]
mov ecx, dword [ebp - 0x2a4]
lea edx, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push edx
mov dword [ebp - 0x238], 0
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
call eax
xor edi, edi
mov dword [ebp - 0x224], eax
test eax, eax
jle 0x403052
xor eax, eax
mov dword [ebp - 0x22c], eax
nop dword [eax]
mov ecx, dword [ebp - 0x21c]
push dword [ecx + eax]
add ecx, 0x204
add eax, ecx
lea ecx, [ebp - 0x2a8]
push eax
call fcn.004060d0
test eax, eax
jne 0x40303d
mov eax, dword [ebp - 0x22c]
inc edi
add eax, 0x60c
mov dword [ebp - 0x22c], eax
cmp edi, dword [ebp - 0x224]
jl 0x403000
jmp 0x403052
mov eax, dword [ebp - 0x21c]
imul ecx, edi, 0x60c
mov eax, dword [ecx + eax]
mov dword [ebp - 0x238], eax
mov ecx, dword [ebp - 0x2a4]
push dword [ebp - 0x21c]
mov eax, dword [ecx]
call dword [eax + 0x18]
mov edi, dword [ebp - 0x238]
test edi, edi
jne 0x4030c1
cmp dword [ebp - 0x288], edi
je 0x403089
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x220]
cmp eax, dword [ebp - 0x288]
jae 0x403099
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402fc0
push str.Detect_download_device_timeout._n
call fcn.004053b0
add esp, 4
test edi, edi
jne 0x4030c1
push str._ERROR__fail:Not_find_valid_download_devices._n
call fcn.00405380
add esp, 4
mov edi, 4
jmp 0x403bbc
cmp dword [0x5d8118], 0
jne 0x403102
push str._n
call fcn.00405380
push esi
push str.__Pac__:__s__n
call fcn.00405380
add esp, 0xc
cmp edi, 0xffffffff
je 0x4030f5
push edi
push str.__Port_:__d__n
call fcn.00405380
add esp, 8
push str._n
call fcn.00405380
add esp, 4
push 1
call fcn.005493ab
push eax
call fcn.0054974c
add esp, 8
mov dword [ebp - method.CPipeClient.virtual_0], vtable.CPipeClient.0
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x26c], 0
push str.ResearchDownload
call fcn.00406700
push 0x5b0ed4
lea ecx, [ebp - 0x264]
mov byte [ebp - 4], 9
call fcn.00406700
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 0
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 0xa
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
push 0xfffffffffffffff5
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
lea eax, [ebp - 0x284]
mov dword [ebp - 0x280], 0
push eax
push 0xfffffffffffffff5
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
mov eax, dword [0x5d8104]
cmp dword [eax - 0xc], 0
je 0x4033ad
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403cc3
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 0xb
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403d13
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x224], eax
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x22c]
push dword [ebp - 0x24c]
push 0x5b1634
push eax
call fcn.004052b0
mov edx, dword [0x5d8104]
lea ecx, [ebp - 0x24c]
add esp, 4
call fcn.004076e0
mov esi, eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 0xd
call fcn.00407480
mov byte [ebp - 4], 0xe
push dword [esi]
push dword [eax]
lea eax, [ebp - 0x224]
push str._s_s.ini
push eax
call fcn.004052b0
mov byte [ebp - 4], 0xd
or esi, 0xffffffff
mov edx, dword [ebp - 0x220]
add esp, 0x18
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403285
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov eax, esi
mov edx, dword [ebp - 0x24c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4032a6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x224]
push edi
push dword [ebp - 0x22c]
push str.Baud_rate
push str.Serial_port
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
call fcn.004080c9
mov ecx, eax
test ecx, ecx
je 0x403d1d
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x21c], eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 0xf
call fcn.00407480
mov byte [ebp - 4], 0x10
push dword [0x5d8104]
push dword [eax]
lea eax, [ebp - 0x21c]
push str._s_s
push eax
call fcn.004052b0
mov byte [ebp - 4], 0xf
add esp, 0x10
mov edx, dword [ebp - 0x220]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403332
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x21c]
cmp dword [esi - 0xc], 0
je 0x40334f
lea eax, [ebp - 0x21c]
mov ecx, 0x5d80c8
push eax
call fcn.00405440
mov byte [ebp - 4], 0xc
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40336b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x403387
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
or edi, 0xffffffff
mov edx, dword [ebp - 0x22c]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4033b0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4033b0
or edi, 0xffffffff
call fcn.004080c9
cmp dword [ebp - 0x228], 0
mov ecx, eax
je 0x4034e0
test ecx, ecx
je 0x403cc3
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x228], eax
sub esp, 8
mov byte [ebp - 4], 0x11
mov edx, dword [0x5d8104]
lea ecx, [ebp - 0x224]
call fcn.004076e0
mov esi, eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 0x12
call fcn.00407480
mov byte [ebp - 4], 0x13
push dword [esi]
push dword [eax]
lea eax, [ebp - 0x228]
push str._s_s.ini
push eax
call fcn.004052b0
mov byte [ebp - 4], 0x12
add esp, 0x18
mov edx, dword [ebp - 0x220]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403442
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x11
mov eax, edi
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403463
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x23c]
mov esi, dword [ebp - 0x228]
cmp dword [edi - 0xc], 0
jne 0x40348a
push str.SN_is_empty_Please_input_SN_...__n
call fcn.004053b0
add esp, 4
or edi, 0xffffffff
jmp 0x403608
push esi
push 0x5b14c0
push 0x5b14c4
push 0x5b14e4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.FixedSN
push 0x5b14e4
call edi
push esi
push 0x5b14c0
push str.AutoStartAfterInputSN
push 0x5b14e4
call edi
push esi
push 0x5b14c0
push str.AutoGenerateSN
push 0x5b14e4
call edi
or edi, 0xffffffff
jmp 0x403608
test ecx, ecx
je 0x403cc3
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x228], eax
sub esp, 8
mov byte [ebp - 4], 0x14
mov edx, dword [0x5d8104]
lea ecx, [ebp - 0x224]
call fcn.004076e0
mov esi, eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 0x15
call fcn.00407480
mov byte [ebp - 4], 0x16
push dword [esi]
push dword [eax]
lea eax, [ebp - 0x228]
push str._s_s.ini
push eax
call fcn.004052b0
mov byte [ebp - 4], 0x15
add esp, 0x18
mov edx, dword [ebp - 0x220]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40355e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x14
mov eax, edi
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40357f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [0x5d8104]
lea ecx, [ebp - 0x220]
sub esp, 8
call fcn.004076e0
add esp, 8
mov ecx, str.ResearchDownload
mov eax, dword [eax]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4035c6
test dx, dx
je 0x4035c2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4035c6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4035a0
xor esi, esi
jmp 0x4035cb
sbb esi, esi
or esi, 1
mov edx, dword [ebp - 0x220]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4035e8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
mov esi, dword [ebp - 0x228]
jne 0x403608
push esi
push 0x5b1548
push 0x5b14c4
push 0x5b14e4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, edi
mov byte [ebp - 4], 0xa
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403623
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.004080c9
cmp dword [ebp - 0x230], 0
mov ecx, eax
je 0x403765
test ecx, ecx
je 0x403cc3
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x230], eax
sub esp, 8
mov byte [ebp - 4], 0x17
mov edx, dword [0x5d8104]
lea ecx, [ebp - 0x228]
call fcn.004076e0
mov esi, eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 0x18
call fcn.00407480
mov byte [ebp - 4], 0x19
push dword [esi]
push dword [eax]
lea eax, [ebp - 0x230]
push str._s_s.ini
push eax
call fcn.004052b0
mov byte [ebp - 4], 0x18
add esp, 0x18
mov edx, dword [ebp - 0x220]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4036b5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x17
mov eax, edi
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4036d6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x240]
mov esi, dword [ebp - 0x230]
cmp dword [edi - 0xc], 0
jne 0x4036fd
push str.SN_is_empty_Please_input_SN_...__n
call fcn.004053b0
add esp, 4
or eax, 0xffffffff
jmp 0x403822
push esi
push 0x5b14c0
push 0x5b14c4
push 0x5b14e4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0x5b154c
push 0x5b14e4
call edi
push esi
push 0x5b14c0
push str.WriteSN2Enable
push 0x5b14e4
call edi
push esi
push 0x5b14c0
push str.AutoGenerateSN
push 0x5b14e4
call edi
push esi
push 0x5b14c0
push str.AutoStartAfterInputSN
push 0x5b14e4
call edi
or eax, 0xffffffff
jmp 0x403822
test ecx, ecx
je 0x403cc3
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x230], eax
sub esp, 8
mov byte [ebp - 4], 0x1a
mov edx, dword [0x5d8104]
lea ecx, [ebp - 0x228]
call fcn.004076e0
mov esi, eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 0x1b
call fcn.00407480
mov byte [ebp - 4], 0x1c
push dword [esi]
push dword [eax]
lea eax, [ebp - 0x230]
push str._s_s.ini
push eax
call fcn.004052b0
mov byte [ebp - 4], 0x1b
add esp, 0x18
mov edx, dword [ebp - 0x220]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4037e3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1a
mov eax, edi
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403804
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x230]
push esi
push 0x5b1548
push str.WriteSN2Enable
push 0x5b14e4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, edi
add esi, 0xfffffff0
mov byte [ebp - 4], 0xa
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40383b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x274], 0
je 0x403849
call fcn.00405c20
mov eax, dword [0x5d8108]
cmp dword [eax - 0xc], 0
jne 0x403864
push 0x5d8108
lea ecx, [ebp - 0x264]
call fcn.00405440
mov eax, dword [0x5d810c]
cmp dword [eax - 0xc], 0
je 0x40387f
push 0x5d810c
lea ecx, [ebp - 0x268]
call fcn.00405440
mov eax, dword [ebp - 0x25c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x260], 0x4024f0
mov dword [ebp - 0x254], 1
test eax, eax
je 0x4038d3
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4038c1
push 1
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x25c]
call esi
mov dword [ebp - 0x25c], 0
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x4038ea
push eax
call esi
mov dword [ebp - 0x26c], 0
mov edi, dword [ebp - 0x238]
lea eax, [ebp - 0x258]
push eax
push 0
lea eax, [ebp - 0x270]
mov dword [ebp - 0x254], 0
push eax
push 0x406990
push 0
push 0
mov dword [ebp - 0x250], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, dword [0x5d8118]
mov ecx, 0x5d80cc
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x234]
push eax
call fcn.00405440
lea eax, [ebp - 0x23c]
mov dword [0x5d80d4], edi
push eax
mov ecx, 0x5d80f8
call fcn.00405440
lea eax, [ebp - 0x240]
mov ecx, 0x5d80fc
push eax
call fcn.00405440
lea eax, [ebp - 0x244]
mov ecx, 0x5d8100
push eax
call fcn.00405440
mov eax, dword [ebp - 0x278]
mov dword [0x5d80c0], esi
mov esi, dword [ebp - 0x248]
mov dword [0x5d80d8], eax
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x4039ae
cmp ecx, dword [esi - 0x10]
jne 0x4039ae
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x4039dc
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
mov eax, dword [eax]
call eax
mov edi, eax
test edi, edi
je 0x403d27
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
lea eax, [edi + 0x10]
mov ecx, dword [esi - 0xc]
inc ecx
push ecx
push esi
push ecx
push eax
call fcn.00402110
add esp, 0x10
lea esi, [edi + 0x10]
mov dword [ebp - 0x220], esi
mov byte [ebp - 4], 0x1d
mov eax, dword [0x5d80d0]
lea edx, [eax - 0x10]
mov dword [0x5d80c4], 0
cmp dword [edx + 4], 0
mov edi, dword [edx]
je 0x403a4e
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x403a29
cmp dword [eax - 8], 0
jl 0x403d2c
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [0x5d80d0]
mov word [eax], cx
jmp 0x403a4e
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x403a3d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [0x5d80d0], eax
cmp dword [ebp - 0x27c], 0
je 0x403a7a
cmp dword [esi - 0xc], 0
je 0x403a7a
push esi
push str.__s_
push 0x5d80d0
mov dword [0x5d80c4], 1
call fcn.004052b0
add esp, 0xc
mov byte [ebp - 4], 0xa
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403a96
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00405890
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
mov dword [0x5d80b0], eax
cmp dword [0x5d80bc], 0
jne 0x403b10
mov eax, dword [0x5d80dc]
test eax, eax
je 0x403ad7
push 0x7d0
push eax
call esi
test eax, eax
je 0x403ae4
cmp dword [0x5d80bc], 0
jne 0x403b10
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403ab0
push dword [0x5d80dc]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [0x5d80e0]
call edi
xorps xmm0, xmm0
mov dword [0x5d80bc], 1
movups xmmword [0x5d80dc], xmm0
jmp 0x403b16
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x254], 1
test eax, eax
je 0x403b56
push 0x7d0
push eax
call esi
test eax, eax
je 0x403b44
push 1
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x25c]
call edi
mov dword [ebp - 0x25c], 0
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x403b6d
push eax
call edi
mov dword [ebp - 0x26c], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea eax, [ebp - 0x284]
push eax
push 0xfffffffffffffff5
mov dword [ebp - 0x254], 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
lea eax, [ebp - 0x284]
mov dword [ebp - 0x280], 1
push eax
push 0xfffffffffffffff5
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
mov edi, dword [0x5d80b0]
lea ecx, [ebp - 0x270]
call fcn.004068c0
mov eax, dword [ebp - 0x2a4]
mov dword [ebp - method.CFindValidDut.virtual_0], vtable.CFindValidDut.0
test eax, eax
je 0x403bda
push eax
call dword [sym.imp.PortHound.dll_ReleaseDevHound]
add esp, 4
mov eax, dword [ebp - 0x2a0]
test eax, eax
je 0x403bee
push eax
call dword [sym.imp.Channel9.dll_ReleaseChannel]
add esp, 4
lea ecx, [ebp - 0x29c]
call fcn.0040b09d
mov esi, dword [ebp - 0x234]
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov edx, dword [ebp - 0x23c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403c21
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403c43
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x244]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403c65
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x248]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403c87
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403ca6
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053e9fa
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004023a0
push 0x80004005
call fcn.004023a0
push 0x80004005
call fcn.004023a0
push 0x80004005
call fcn.004023a0
push 0x80070057
call fcn.004023a0
push 0x80004005
call fcn.004023a0
push 0x80070057
call fcn.004023a0
push 0x80004005
call fcn.004023a0
push 0x80004005
call fcn.004023a0
push 0x80004005
call fcn.004023a0
call fcn.00402020
push 0x80070057
call fcn.004023a0
int3