Function at 0x401920
Capabilities:
Accept command line arguments
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42bc78
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x437d18]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.004060b7
test eax, eax
jne 0x401991
push str.Fatal_Error:_MFC_initialization_failed_n
call fcn.00411637
add esp, 4
lea eax, [ebx + 1]
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [esp + 0x18], edi
call fcn.00404cc6
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4019b1
push 0x80004005
call fcn.00401650
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x78], ebx
mov dword [esp + 0x20], ebx
call fcn.00401310
mov esi, 1
cmp dword [ebp + 8], esi
jle 0x401a9f
mov edi, dword [ebp + 0xc]
lea ebx, [esi + 1]
mov ecx, dword [edi + esi*4]
push str._pac
push ecx
call fcn.00411943
add esp, 8
test eax, eax
jne 0x401a42
cmp ebx, dword [ebp + 8]
jge 0x401a8e
mov edx, dword [edi + esi*4 + 4]
inc esi
inc ebx
test edx, edx
jne 0x401a1b
push eax
push edx
lea ecx, [esp + 0x1c]
call fcn.00401520
jmp 0x401a8e
mov eax, edx
lea ecx, [eax + 2]
mov dword [esp + 0x1c], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401a24
sub eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
sar eax, 1
push eax
push edx
call fcn.00401520
jmp 0x401a8e
mov edx, dword [edi + esi*4]
push str._port
push edx
call fcn.00411943
add esp, 8
test eax, eax
jne 0x401a71
cmp ebx, dword [ebp + 8]
jge 0x401a8e
mov eax, dword [edi + esi*4 + 4]
inc esi
push eax
inc ebx
call fcn.004119ec
add esp, 4
mov dword [esp + 0x18], eax
jmp 0x401a8e
mov ecx, dword [edi + esi*4]
push 0x431b38
push ecx
call fcn.00411943
add esp, 8
test eax, eax
jne 0x401a8e
mov dword [esp + 0x20], 1
inc esi
inc ebx
cmp esi, dword [ebp + 8]
jl 0x4019e6
mov edi, dword [esp + 0x18]
xor ebx, ebx
mov esi, dword [esp + 0x14]
mov eax, dword [esi - 0xc]
cmp eax, ebx
je 0x401e9b
cmp edi, ebx
je 0x401e9b
cmp eax, ebx
je 0x401b77
lea ecx, [esp + 0x30]
call fcn.0040654e
push ebx
push esi
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 1
call fcn.0040660b
test eax, eax
jne 0x401b60
push str.Invalid_arguments_Pac_file___s__dont_exist._n
call fcn.00411637
add esp, 4
push str.CmdDloader_Usage_n
call fcn.00411637
add esp, 4
push str.CmdDloader.exe___pac_file____port_portnumber__n
call fcn.00411637
add esp, 4
push str.e.g.CmdDloader.exe__pac_d:_test.pac__port_5_n
call fcn.00411637
add esp, 4
lea ecx, [esp + 0x30]
mov byte [esp + 0x78], 0
call fcn.00406577
lea eax, [esi - 0x10]
mov dword [esp + 0x78], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401b48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x30]
call fcn.0040613e
lea ecx, [esp + 0x30]
mov byte [esp + 0x78], 0
call fcn.00406577
push str._n
call fcn.00411637
add esp, 4
push esi
push str.__Pac__:__s__n
call fcn.00411637
push edi
push str.__Port_:__d__n
call fcn.00411637
push str._n
call fcn.00411637
add esp, 0x14
lea ecx, [esp + 0x48]
push ecx
call fcn.00403bd0
lea edx, [esp + 0x28]
push edx
mov byte [esp + 0x7c], 2
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
lea eax, [esp + 0x28]
push eax
push 0xfffffffffffffff5
mov dword [esp + 0x34], ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
mov ecx, dword [0x43c0f4]
mov eax, dword [ecx - 0xc]
cmp eax, ebx
je 0x401cb2
call fcn.00404cc6
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x401c0b
push 0x80004005
call fcn.00401650
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov bl, 3
lea edi, [esp + 0x24]
mov byte [esp + 0x78], bl
call fcn.00404ba0
mov byte [esp + 0x78], 4
mov ecx, dword [0x43c0f4]
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x24]
push str._s_s
push eax
call fcn.004036b0
mov byte [esp + 0x88], bl
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401c72
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x1c]
cmp dword [esi - 0xc], 0
je 0x401c8b
lea ecx, [esp + 0x1c]
push ecx
mov ecx, 0x43c0cc
call fcn.00403740
lea eax, [esi - 0x10]
mov byte [esp + 0x78], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401cac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x18]
xor ebx, ebx
cmp dword [esp + 0x20], ebx
je 0x401cc8
mov ecx, dword [0x43c0cc]
push 0x43c0e8
call fcn.004043a0
mov ecx, dword [0x43c0f8]
cmp dword [ecx - 0xc], ebx
jne 0x401ce1
push 0x43c0f8
lea ecx, [esp + 0x58]
call fcn.00403740
mov edx, dword [0x43c0fc]
cmp dword [edx - 0xc], ebx
je 0x401cfa
push 0x43c0fc
lea ecx, [esp + 0x54]
call fcn.00403740
push edi
lea esi, [esp + 0x4c]
mov dword [esp + 0x5c], 0x401860
call fcn.00403f70
lea eax, [esp + 0x14]
push eax
mov ecx, 0x43c0d0
call fcn.00403740
mov dword [0x43c0d4], edi
call fcn.004039d0
push 0x43c0c0
push ebx
push 0x43c0c4
push 0x4016f0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x43c0bc], eax
lea esp, [esp]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x43c0c8], ebx
jne 0x401dba
mov eax, dword [0x43c0d8]
cmp eax, ebx
je 0x401d7f
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401d88
cmp dword [0x43c0c8], ebx
jne 0x401dba
push 0x3e8
call esi
jmp 0x401d50
mov ecx, dword [0x43c0d8]
push ecx
call edi
mov edx, dword [0x43c0dc]
push edx
call edi
xor eax, eax
mov dword [0x43c0d8], eax
mov dword [0x43c0dc], eax
mov dword [0x43c0e0], eax
mov dword [0x43c0e4], eax
mov dword [0x43c0c8], 1
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x64], 1
cmp eax, ebx
je 0x401df2
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401de7
mov eax, dword [esp + 0x5c]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esp + 0x5c]
push ecx
call edi
mov dword [esp + 0x5c], ebx
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x401e01
push eax
call edi
mov dword [esp + 0x4c], ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea edx, [esp + 0x28]
push edx
push 0xfffffffffffffff5
mov dword [esp + 0x6c], ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
lea eax, [esp + 0x28]
push eax
push 0xfffffffffffffff5
mov dword [esp + 0x34], 1
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
mov eax, dword [0x43c0bc]
cmp eax, ebx
je 0x401e71
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401e62
mov ecx, dword [0x43c0bc]
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 5
call fcn.00411fcc
mov edx, dword [0x43c0bc]
push edx
call edi
mov dword [0x43c0bc], ebx
lea ecx, [esp + 0x48]
call fcn.00403c70
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x401b3c
push str.Invalid_arguments_n
call fcn.00411637
add esp, 4
push str.CmdDloader_Usage_n
call fcn.00411637
add esp, 4
push str.CmdDloader.exe___pac_file____port_portnumber__n
call fcn.00411637
add esp, 4
push str.e.g.CmdDloader.exe__pac_d:_test.pac__port_5_n
call fcn.00411637
lea eax, [esi - 0x10]
add esp, 4
mov dword [esp + 0x78], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401ef3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret