Function at 0x4046e0
Capabilities:
Accept command line arguments
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50eb38
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x5635b8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x51d54c
lea ecx, [ebp - 0x20]
call fcn.004030b0
xor edi, edi
push 0x51d548
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], edi
call fcn.004030b0
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x14]
call fcn.004030b0
mov byte [ebp - 4], 2
call fcn.00408e92
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404758
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 3
call fcn.00408e92
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404785
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 4
call fcn.00408e92
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4047b2
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x24], ebx
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 4]
push edx
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.00403170
mov eax, dword [esi + 4]
mov dword [eax + 4], eax
mov eax, dword [esi + 4]
mov dword [eax], eax
mov eax, dword [esi + 4]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 8], edi
cmp eax, edi
je 0x404ada
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], edi
jl 0x404ada
push eax
push ecx
call fcn.004f89c7
add esp, 8
cmp eax, edi
je 0x404ada
mov ecx, dword [ebp - 0x14]
sub eax, ecx
sar eax, 1
mov edi, eax
js 0x404ada
jmp 0x404827
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x404ada
mov eax, dword [ecx - 0xc]
test edi, edi
js 0x404ada
cmp edi, eax
jg 0x404ada
push edx
lea eax, [ecx + edi*2]
push eax
call fcn.004f89c7
add esp, 8
test eax, eax
je 0x404ada
mov ecx, dword [ebp - 0x14]
sub eax, ecx
sar eax, 1
mov esi, eax
js 0x404ada
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x404890
cmp esi, dword [ecx - 0xc]
jg 0x404890
push eax
lea ecx, [ecx + esi*2]
push ecx
call fcn.004f89c7
add esp, 8
test eax, eax
je 0x404890
sub eax, dword [ebp - 0x14]
sar eax, 1
mov dword [ebp - 0x1c], eax
jmp 0x404897
mov dword [ebp - 0x1c], 0xffffffff
mov edx, esi
sub edx, edi
push edx
push edi
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401df0
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.004027e0
mov ecx, eax
call fcn.00401f20
mov ecx, dword [eax]
mov edi, dword [ebp - 0x18]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x404913
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x404906
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x404906
push eax
call fcn.00401880
mov dword [ebp - 0x2c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4048fb
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x10
mov dword [ebp - 0x18], ecx
jmp 0x404913
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x18]
call fcn.00402200
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404936
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
test eax, eax
js 0x4049af
sub eax, esi
dec eax
push eax
inc esi
push esi
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401df0
mov ecx, dword [eax]
mov esi, dword [ebp - 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov byte [ebp - 4], 7
cmp eax, esi
je 0x4049aa
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40499d
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40499d
push eax
call fcn.00401880
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x404992
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x34]
add ebx, 0x10
mov dword [ebp - 0x10], ebx
jmp 0x404a18
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00402200
mov eax, dword [ebp - 0x34]
jmp 0x404a18
inc esi
push esi
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00402500
mov ecx, dword [eax]
mov esi, dword [ebp - 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov byte [ebp - 4], 8
cmp eax, esi
je 0x404a15
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x404a08
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x404a08
push eax
call fcn.00401880
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x404a00
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x10], ebx
jmp 0x404a15
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00402200
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 5
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a38
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x10]
call fcn.004027e0
mov ecx, eax
call fcn.00401f20
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
mov esi, eax
call fcn.00404530
mov ecx, dword [esi]
mov edi, eax
mov esi, dword [edi]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x404aac
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x404aa0
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x404aa0
push eax
call fcn.00401880
mov dword [ebp - 0x2c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x404a96
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x404aac
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, edi
call fcn.00402200
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
push edx
push eax
lea ecx, [ebp - 0x24]
push str.CWinMain::GetCommandLineParams___Parameter__s_s_r_n
push ecx
call fcn.00402d20
mov ebx, dword [ebp - 0x24]
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edi, dword [ebp - 0x1c]
test edi, edi
jns 0x404824
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404afa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b40
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b63
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404bac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4