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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xacc
mov eax, dword [0x40a070]
xor eax, esp
mov dword [esp + 0xac8], eax
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
push 0x401574
push edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], eax
call dword [0x40b1b8]
pop ecx
pop ecx
test eax, eax
je 0x404598
push 0x401588
push edi
call dword [0x40b1b8]
pop ecx
pop ecx
test eax, eax
je 0x404598
push 0x104
lea eax, [esp + 0xc4]
push eax
push edi
call dword [0x40b0b4]
test eax, eax
je 0x4045ea
lea edi, [esp + 0xc0]
jmp 0x4045ea
push 0x104
lea eax, [esp + 0xc4]
mov dword [esp + 0x20], 1
push eax
push 0x4015a4
call dword [0x40b0b4]
test eax, eax
je 0x4045c3
lea edi, [esp + 0xc0]
mov eax, dword [section..data]
cmp eax, section..data
je 0x4045ea
test byte [eax + 0x1c], 1
je 0x4045ea
cmp byte [eax + 0x19], 4
jb 0x4045ea
push edi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xf
pop ecx
call fcn.004031f5
cmp dword [ebp + 0x14], 0
je 0x40472b
xor eax, eax
mov esi, eax
cmp dword [0x40a470], eax
jne 0x404630
push eax
push eax
push 0x401540
mov ebx, eax
call dword [0x40b08c]
test eax, eax
je 0x404a22
push 0x4015d8
push eax
call dword [0x40b090]
mov dword [0x40a470], eax
test eax, eax
je 0x404a22
mov ecx, edi
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x404637
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push 0x40
call dword [0x40b070]
mov ebx, eax
test ebx, ebx
je 0x40495f
mov edx, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [esp + 0x14]
jne 0x404665
sub edx, ecx
mov ecx, ebx
sar edx, 1
push edi
inc edx
call fcn.004030e0
cmp dword [esp + 0x18], esi
jne 0x4046a3
mov ecx, ebx
call fcn.004044ce
mov esi, eax
test esi, esi
je 0x4046a3
xor eax, eax
cmp word [esi], ax
je 0x4046a1
mov word [esi], ax
add esi, 2
jmp 0x4046a3
mov esi, eax
mov ecx, ebx
call fcn.00404149
push 0x3c
pop edi
xor eax, eax
push edi
push eax
lea eax, [esp + 0x34]
push eax
call 0x409576
movzx eax, word [ebp + 0x18]
add esp, 0xc
mov dword [esp + 0x48], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x40], esi
mov esi, dword [0x40a470]
mov ecx, esi
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], 0x640
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0x4015e8
call dword [0x40b224]
call esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x40471b
cmp dword [ebp + 0x10], 0
je 0x404711
push 0xffffffffffffffff
push dword [esp + 0x68]
call dword [0x40b138]
push dword [esp + 0x64]
call dword [0x40b054]
push ebx
call dword [0x40b074]
mov ebx, dword [esp + 0x10]
jmp 0x404a22
mov eax, ebx
mov ecx, ebx
neg eax
sbb eax, eax
not eax
and eax, edi
neg ecx
mov dword [esp + 0x24], eax
sbb ecx, ecx
and ecx, edi
mov dword [esp + 0x28], ecx
mov dx, word [ebp + 0x18]
xor ebx, ebx
mov word [esp + 0xa8], dx
xor esi, esi
xor edx, edx
mov dword [esp + 0x78], 0x44
mov word [esp + 0xaa], dx
inc esi
lea edx, [esp + 0x68]
mov dword [esp + 0x7c], edi
push edx
lea edx, [esp + 0x7c]
mov dword [esp + 0x88], edi
push edx
push ebx
push ebx
push 0x20
push ebx
push ebx
push ebx
push eax
push ecx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xcc], esi
mov dword [esp + 0xd4], ebx
call dword [0x40b0d4]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x404959
call dword [0x40b040]
cmp eax, 0x2e4
jne 0x404966
cmp dword [ebp + 0x1c], ebx
je 0x404966
mov esi, ebx
mov dword [esp + 0x20], ebx
cmp dword [0x40a470], ebx
jne 0x404821
xor eax, eax
push eax
push eax
push 0x401540
call dword [0x40b08c]
test eax, eax
je 0x40496a
push 0x4015d8
push eax
call dword [0x40b090]
mov dword [0x40a470], eax
test eax, eax
je 0x40496a
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x404826
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push 0x40
call dword [0x40b070]
mov ebx, eax
test ebx, ebx
je 0x40495f
mov edx, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [esp + 0x14]
jne 0x404854
sub edx, ecx
mov ecx, ebx
sar edx, 1
push edi
inc edx
call fcn.004030e0
cmp dword [esp + 0x18], esi
jne 0x404892
mov ecx, ebx
call fcn.004044ce
mov esi, eax
test esi, esi
je 0x404892
xor eax, eax
cmp word [esi], ax
je 0x404890
mov word [esi], ax
add esi, 2
jmp 0x404892
mov esi, eax
mov ecx, ebx
call fcn.00404149
xor eax, eax
push 0x3c
push eax
lea eax, [esp + 0x34]
push eax
call 0x409576
movzx eax, word [ebp + 0x18]
add esp, 0xc
mov dword [esp + 0x48], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x40], esi
mov esi, dword [0x40a470]
mov ecx, esi
push eax
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x34], 0x640
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0x4015f4
call dword [0x40b224]
call esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x4048f8
mov eax, dword [esp + 0x64]
mov dword [esp + 0x68], eax
push ebx
call dword [0x40b074]
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x40496a
mov esi, dword [esp + 0x20]
cmp dword [ebp + 0x10], 0
je 0x40491d
push 0xffffffffffffffff
push dword [esp + 0x6c]
call dword [0x40b138]
push dword [esp + 0x68]
call dword [0x40b054]
test esi, esi
je 0x404935
push dword [esp + 0x6c]
call dword [0x40b054]
cmp dword [ebp + 0x10], 0
je 0x404a22
call fcn.0040874a
test al, al
jne 0x404a22
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
jmp 0x404745
mov ebx, dword [esp + 0x10]
jmp 0x40490b
xor eax, eax
jmp 0x404a24
mov ebx, dword [esp + 0x10]
mov eax, dword [section..data]
mov esi, section..data
cmp eax, esi
je 0x40499f
test byte [eax + 0x1c], 1
je 0x40499f
cmp byte [eax + 0x19], 2
jb 0x40499f
call dword [0x40b040]
push eax
mov eax, dword [section..data]
push edi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x10
pop ecx
call fcn.004033bd
call fcn.0040418b
test al, al
jne 0x404a22
cmp dword [esp + 0x1c], 1
jne 0x404a22
call fcn.0040874a
test al, al
je 0x404a22
mov eax, dword [section..data]
cmp eax, esi
je 0x4049db
test byte [eax + 0x1c], 1
je 0x4049db
cmp byte [eax + 0x19], 2
jb 0x4049db
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x11
pop ecx
call fcn.004031d3
mov esi, 0x200
lea eax, [esp + 0x2d0]
push esi
push eax
push 0x648
xor edi, edi
push edi
call dword [0x40b09c]
push esi
lea eax, [esp + 0x6d4]
push eax
push 0x647
push edi
call dword [0x40b09c]
lea eax, [esp + 0x2d0]
push eax
lea eax, [esp + 0x6d4]
push eax
call dword [0x40d020]
mov eax, ebx
mov ecx, dword [esp + 0xad4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00408b10
mov esp, ebp
pop ebp
ret 0x18