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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50e8d8
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 0x51d59c
lea ecx, [ebp - 0x20]
call fcn.004030e0
xor edi, edi
push 0x51d598
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], edi
call fcn.004030e0
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x14]
call fcn.004030e0
mov byte [ebp - 4], 2
call fcn.00408caa
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404618
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.00408caa
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404645
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.00408caa
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404672
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.004031a0
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 0x40499a
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], edi
jl 0x40499a
push eax
push ecx
call fcn.004f8797
add esp, 8
cmp eax, edi
je 0x40499a
mov ecx, dword [ebp - 0x14]
sub eax, ecx
sar eax, 1
mov edi, eax
js 0x40499a
jmp 0x4046e7
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x40499a
mov eax, dword [ecx - 0xc]
test edi, edi
js 0x40499a
cmp edi, eax
jg 0x40499a
push edx
lea eax, [ecx + edi*2]
push eax
call fcn.004f8797
add esp, 8
test eax, eax
je 0x40499a
mov ecx, dword [ebp - 0x14]
sub eax, ecx
sar eax, 1
mov esi, eax
js 0x40499a
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x404750
cmp esi, dword [ecx - 0xc]
jg 0x404750
push eax
lea ecx, [ecx + esi*2]
push ecx
call fcn.004f8797
add esp, 8
test eax, eax
je 0x404750
sub eax, dword [ebp - 0x14]
sar eax, 1
mov dword [ebp - 0x1c], eax
jmp 0x404757
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 0x4047d3
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x4047c6
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4047c6
push eax
call fcn.004018a0
mov dword [ebp - 0x2c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4047bb
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 0x4047d3
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 0x4047f6
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 0x40486f
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 0x40486a
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40485d
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40485d
push eax
call fcn.004018a0
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x404852
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 0x4048d8
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00402200
mov eax, dword [ebp - 0x34]
jmp 0x4048d8
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 0x4048d5
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4048c8
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4048c8
push eax
call fcn.004018a0
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x4048c0
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 0x4048d5
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 0x4048f8
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.004043f0
mov ecx, dword [esi]
mov edi, eax
mov esi, dword [edi]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x40496c
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x404960
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x404960
push eax
call fcn.004018a0
mov dword [ebp - 0x2c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x404956
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 0x40496c
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 0x4046e4
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 0x4049ba
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 0x4049dd
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 0x404a00
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 0x404a23
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 0x404a46
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 0x404a6c
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