Function at 0x405040
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4ce761
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x4fa36c]
xor eax, esp
mov dword [esp + 0xe4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4fa36c]
xor eax, esp
push eax
lea eax, [esp + 0xfc]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x10c]
mov ebp, dword [esp + 0x110]
mov edi, ecx
xor ecx, ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x104], 1
mov eax, dword [ebp + 4]
mov esi, ebp
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], eax
test esi, esi
mov eax, dword [ebp + 4]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
je 0x4050d2
cmp esi, ebp
je 0x4050d7
call fcn.004ab591
mov eax, dword [esp + 0x34]
cmp eax, dword [esp + 0x78]
je 0x40518a
mov dword [esp + 0x18], esi
lea esi, [esp + 0x18]
mov dword [esp + 0x1c], eax
call fcn.0046d910
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x405103
call fcn.004ab591
mov esi, dword [esp + 0x1c]
cmp esi, dword [edi + 4]
jne 0x405111
call fcn.004ab591
mov ecx, dword [esi + 0x28]
push ecx
lea edx, [esp + 0x54]
push ebx
push edx
call fcn.00404760
mov eax, dword [esp + 0x60]
xor esi, esi
add esp, 0xc
cmp eax, esi
je 0x405136
push eax
call fcn.004a93cc
add esp, 4
mov eax, dword [ebx + 0x14]
cmp eax, esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
jne 0x40514f
mov dword [esp + 0x20], esi
jmp 0x405158
mov ecx, dword [ebx + 0x18]
sub ecx, eax
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x20]
push edx
mov esi, ebx
call fcn.00414cb0
lea edi, [ebx + 0x34]
push edi
lea esi, [esp + 0x64]
call fcn.00414cb0
add dword [edi], 0xffffffff
lea esi, [esp + 0x30]
call fcn.0046d910
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x3c]
jmp 0x4050c1
mov eax, dword [ebp + 4]
mov esi, ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], eax
nop
test esi, esi
mov eax, dword [ebp + 4]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
je 0x4051b1
cmp esi, ebp
je 0x4051b6
call fcn.004ab591
mov ecx, dword [esp + 0x78]
cmp dword [esp + 0x34], ecx
je 0x4052b8
lea edx, [esp + 0x90]
push edx
call fcn.004038f0
mov byte [esp + 0x104], 2
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], esi
lea esi, [esp + 0x18]
mov dword [esp + 0x90], 6
mov dword [esp + 0x1c], eax
call fcn.0046d910
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x405206
call fcn.004ab591
mov esi, dword [esp + 0x1c]
cmp esi, dword [edi + 4]
jne 0x405214
call fcn.004ab591
lea eax, [esi + 0xc]
push 0xffffffffffffffff
xor esi, esi
push esi
push eax
lea ecx, [esp + 0xbc]
call fcn.00416760
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x54]
push ebx
push edx
call fcn.00404760
mov eax, dword [esp + 0x60]
add esp, 0xc
cmp eax, esi
je 0x405250
push eax
call fcn.004a93cc
add esp, 4
mov eax, dword [ebx + 0x14]
cmp eax, esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
jne 0x405269
mov dword [esp + 0x20], esi
jmp 0x405272
mov ecx, dword [ebx + 0x18]
sub ecx, eax
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x20]
push edx
mov esi, ebx
call fcn.00414cb0
lea edi, [ebx + 0x34]
push edi
lea esi, [esp + 0x64]
call fcn.00414cb0
add dword [edi], 0xffffffff
lea ecx, [esp + 0x90]
mov byte [esp + 0x104], 1
call fcn.00403990
lea esi, [esp + 0x30]
call fcn.0046d910
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x3c]
jmp 0x4051a0
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov byte [esp + 0x104], 3
mov eax, dword [ebp + 8]
cmp eax, 0xf
lea esi, [esp + 0x40]
jae 0x4052f1
or al, 0xd0
mov byte [esp + 0x17], al
lea eax, [esp + 0x17]
push eax
call fcn.00414fe0
xor esi, esi
jmp 0x405395
lea ecx, [esp + 0x17]
push ecx
mov byte [esp + 0x1b], 0xdf
call fcn.00414fe0
mov eax, dword [ebp + 8]
push 0
push 0
push eax
lea edx, [esp + 0x38]
push ebx
push edx
call fcn.00405a20
add esp, 0x14
mov byte [esp + 0x104], 4
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
cmp ecx, eax
mov esi, eax
jbe 0x405339
call fcn.004ab591
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
cmp ecx, eax
mov dword [esp + 0x20], ecx
jbe 0x405346
call fcn.004ab591
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x44], eax
lea ebp, [esp + 0x2c]
mov dword [esp + 0x18], eax
jbe 0x40535d
call fcn.004ab591
mov edx, dword [esp + 0x18]
push esi
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x28]
push ecx
push ebp
lea eax, [esp + 0x50]
push edx
push eax
mov esi, eax
call fcn.00419a60
mov byte [esp + 0x104], 3
mov eax, dword [esp + 0x30]
xor esi, esi
cmp eax, esi
je 0x405395
push eax
call fcn.004a93cc
add esp, 4
mov dword [edi + 4], esi
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
mov esi, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
cmp esi, eax
mov dword [esp + 0x70], 1
jbe 0x4053bb
call fcn.004ab591
mov eax, dword [esp + 0x68]
lea ebp, [esp + 0x60]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], esi
jmp 0x4053d0
cmp dword [esp + 0x64], eax
mov dword [esp + 0x18], eax
jbe 0x4053df
call fcn.004ab591
test ebp, ebp
je 0x4053eb
lea eax, [esp + 0x60]
cmp ebp, eax
je 0x4053f0
call fcn.004ab591
cmp esi, dword [esp + 0x18]
je 0x40551c
test ebp, ebp
jne 0x405403
call fcn.004ab591
cmp esi, dword [ebp + 8]
jb 0x40540d
call fcn.004ab591
mov ecx, dword [esi]
push ecx
lea eax, [esp + 0x84]
call fcn.004199b0
mov byte [esp + 0x108], 5
mov edx, dword [ebx + 0x30]
push edx
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.00407440
add esp, 0x10
mov byte [esp + 0x104], 7
mov eax, dword [esp + 0x84]
xor esi, esi
cmp eax, esi
je 0x405454
push eax
call fcn.004a93cc
add esp, 4
mov ebx, dword [edi + 4]
cmp ebx, dword [edi + 8]
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], esi
jbe 0x405476
call fcn.004ab591
lea esi, [esp + 0x2c]
lea edi, [esp + 0x50]
call fcn.00414fa0
lea esi, [esp + 0x74]
mov ebp, eax
call fcn.00414f70
mov edx, dword [ebp]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [ebp + 4]
mov dword [ecx + 4], edx
mov edx, dword [ebp + 8]
mov dword [ecx + 8], edx
mov edx, dword [eax]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x54]
push ebx
push eax
push eax
call fcn.00419a10
mov byte [esp + 0x104], 3
mov eax, dword [esp + 0x54]
xor esi, esi
cmp eax, esi
je 0x4054e0
push eax
call fcn.004a93cc
add esp, 4
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
cmp edx, dword [ecx + 8]
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
jb 0x4054fe
call fcn.004ab591
add dword [esp + 0x24], 4
mov eax, dword [esp + 0x68]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x3c]
jmp 0x4053d0
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
cmp eax, ecx
mov dword [esp + 0x28], ecx
jbe 0x405539
call fcn.004ab591
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
cmp eax, ecx
mov dword [esp + 0x18], eax
jbe 0x405546
call fcn.004ab591
mov esi, dword [edi + 4]
cmp esi, dword [edi + 8]
lea ebp, [esp + 0x40]
jbe 0x405557
call fcn.004ab591
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
push eax
lea eax, [esp + 0x44]
push eax
push ecx
push ebp
push esi
push edi
mov esi, edi
call fcn.00419a60
mov esi, dword [edi + 8]
cmp dword [edi + 4], esi
jbe 0x40557d
call fcn.004ab591
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
mov dword [esp + 0x28], eax
jbe 0x40558e
call fcn.004ab591
mov ebp, dword [ebx + 0x14]
add ebx, 0x10
cmp ebp, dword [ebx + 8]
jbe 0x40559e
call fcn.004ab591
mov edx, dword [esp + 0x28]
push esi
push edi
push edx
push edi
push ebp
push ebx
mov esi, ebx
call fcn.00419a60
mov eax, dword [esp + 0x44]
xor esi, esi
cmp eax, esi
je 0x4055c2
push eax
call fcn.004a93cc
add esp, 4
mov eax, dword [esp + 0x64]
cmp eax, esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
je 0x4055df
push eax
call fcn.004a93cc
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0xfc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.004a9ce9
add esp, 0xf4
ret