Function at 0x413220
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x150
mov edi, ecx
lea eax, [esp + 0x18]
push 0x130
push 0
push eax
call fcn.00418150
add esp, 0xc
xor eax, eax
cmp dword [edi + 0x64], 0
jne 0x413c52
push dword [edi + 0x28]
push dword [edi + 0x24]
call fcn.00401750
add esp, 8
mov esi, dword [edi + 0x28]
mov dword [esp + 0x34], esi
push 0
push esi
call fcn.0040ac80
add esp, 8
mov ebx, eax
mov dword [esp + 0x30], ebx
push esi
push dword [edi + 0x24]
push ebx
call fcn.0040ec80
add esp, 0xc
push dword [edi + 0x28]
mov dword [esp + 4], edi
push dword [edi + 0x24]
call fcn.00401750
add esp, 8
mov dword [esp + 0x18], ebx
movzx eax, word [ebx]
cmp eax, 0x5a4d
jne 0x413c1d
mov eax, dword [ebx + 0x3c]
mov esi, ebx
add esi, eax
mov dword [esp + 0x2c], esi
cmp dword [ebx + eax], 0x4550
jne 0x413c1d
push 0x40
push 0x2000
push dword [esi + 0x50]
push dword [esi + 0x34]
mov eax, dword [esp + 0x10]
push dword [eax + 0x84]
call fcn.004180f0
add esp, 0x14
test eax, eax
mov dword [esp + 0x44], eax
je 0x413349
mov ecx, 0x7d0d7766
sub ecx, dword [esi + 0x34]
lea ecx, [eax + ecx - 0x7d0d7766]
mov dword [esp + 0x58], ecx
push 4
push 0x1000
push dword [esi + 0x54]
push eax
mov eax, dword [esp + 0x10]
push dword [eax + 0x84]
call fcn.004180f0
add esp, 0x14
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x48], ecx
je 0x413c1d
mov eax, dword [esi + 0x80]
test eax, eax
mov dword [esp + 0x5c], eax
je 0x413389
push eax
push ebx
mov edi, ecx
call fcn.00408680
mov ecx, edi
add esp, 8
mov edi, eax
mov dword [esp + 0x20], edi
jmp 0x41338b
call dword [0x420154]
cmp eax, 0x1e7
jne 0x413c1d
push 0x40
push 0x2000
push dword [esi + 0x50]
push 0
mov eax, dword [esp + 0x10]
push dword [eax + 0x84]
call fcn.004180f0
add esp, 0x14
test eax, eax
mov dword [esp + 0x44], eax
jne 0x4132e7
jmp 0x413c1d
xor edi, edi
mov eax, dword [esi + 0x84]
mov dword [esp + 0x60], eax
mov eax, dword [esi + 0xd8]
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0xdc]
mov dword [esp + 0x68], eax
mov eax, dword [esi + 0x78]
mov dword [esp + 0x6c], eax
mov eax, dword [esi + 0x7c]
mov dword [esp + 0x70], eax
mov dword [esi + 0xd8], 0
mov dword [esi + 0xdc], 0
mov dword [esi + 0x84], 0
mov dword [esi + 0x80], 0
mov dword [esi + 0x7c], 0
mov dword [esi + 0x78], 0
mov eax, dword [esp]
cmp dword [eax + 0x10], 0
je 0x4135da
test edi, edi
je 0x413622
lea esi, [esp + 0x88]
cmp dword [edi], 0
jne 0x413445
jmp 0x413429
add edi, 0x14
mov dword [esp + 0x20], edi
cmp dword [edi], 0
jne 0x413445
jmp 0x413429
mov edi, dword [esp + 0x20]
jmp 0x413410
cmp dword [edi], 0
jne 0x413445
cmp dword [edi + 0x10], 0
jne 0x413445
cmp dword [edi + 8], 0
jne 0x413445
cmp dword [edi + 0xc], 0
jne 0x413445
cmp dword [edi + 4], 0
je 0x413622
mov dword [esp + 0x9c], 0
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov dword [esi], 0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x413424
push eax
push dword [esp + 0x34]
call fcn.00408680
add esp, 8
mov ecx, dword [esp]
mov ebx, eax
mov dword [esp + 0x38], ebx
push ebx
call fcn.004034a0
test eax, eax
mov dword [esp + 0x88], eax
je 0x413c1d
mov dword [esp + 0x3c], ebx
cmp byte [ebx], 0
je 0x4134be
mov byte [ebx], 0
mov eax, dword [esp + 0x3c]
lea ebx, [eax + 1]
mov dword [esp + 0x3c], ebx
cmp byte [eax + 1], 0
jne 0x4134a6
mov edi, dword [esp + 0x20]
mov eax, dword [edi]
test eax, eax
mov dword [esp + 0xa0], eax
jne 0x4134d5
mov eax, dword [edi + 0x10]
mov dword [esp + 0xa0], eax
mov ecx, dword [esp + 0x30]
mov dword [esp + 4], ecx
push eax
push ecx
call fcn.00408680
add esp, 8
mov ebx, eax
mov dword [esp + 0x8c], ebx
push dword [edi + 0x10]
push dword [esp + 8]
call fcn.00408680
add esp, 8
mov dword [esp + 0x90], eax
mov eax, dword [ebx]
test eax, eax
je 0x413410
test eax, eax
js 0x413579
push eax
push dword [esp + 0x34]
call fcn.00408680
add esp, 8
mov ecx, dword [esp]
mov edi, eax
lea eax, [edi + 2]
mov dword [esp + 0x94], edi
push eax
push dword [esp + 0x8c]
call fcn.00401340
test eax, eax
mov dword [esp + 0x9c], eax
je 0x413c1d
mov dword [esp + 0x3c], edi
cmp byte [edi], 0
je 0x4135a8
mov byte [edi], 0
mov eax, dword [esp + 0x3c]
lea edi, [eax + 1]
mov dword [esp + 0x3c], edi
cmp byte [eax + 1], 0
jne 0x413555
mov eax, dword [esp + 0x9c]
test eax, eax
jne 0x4135a8
jmp 0x413c1d
mov edx, eax
mov ecx, dword [esp]
xor edx, 0xffff0000
and edx, eax
push edx
push dword [esp + 0x8c]
call fcn.00401340
mov dword [esp + 0x9c], eax
mov dword [ebx], 0
test eax, eax
je 0x413c1d
mov ecx, dword [esp + 0x90]
mov dword [ecx], eax
mov eax, dword [esp + 0x8c]
lea ebx, [eax + 4]
mov dword [esp + 0x8c], ebx
add dword [esp + 0x90], 4
mov eax, dword [eax + 4]
test eax, eax
jne 0x413510
jmp 0x41341e
push dword [esi + 0x54]
push ebx
push ecx
mov eax, dword [esp + 0xc]
push dword [eax + 0x84]
mov ebx, ecx
call fcn.00418110
mov ecx, ebx
add esp, 0x10
test eax, eax
je 0x413c1d
push 2
push dword [esi + 0x54]
push ecx
mov eax, dword [esp + 0xc]
push dword [eax + 0x84]
call fcn.00405740
add esp, 0x10
test eax, eax
jne 0x4133fa
jmp 0x413c1d
mov eax, dword [esp]
cmp dword [eax + 0x58], 0
je 0x413a0c
mov eax, dword [esp + 0x2c]
movzx ecx, word [eax + 0x14]
lea eax, [eax + ecx + 0x18]
mov dword [esp + 0x24], eax
lea eax, [esp + 0xe4]
push 0x4c
push eax
call fcn.00411ab0
add esp, 8
mov eax, dword [esp + 0x2c]
cmp word [eax + 6], 0
je 0x413754
xor esi, esi
xor ebx, ebx
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + esi + 8]
mov dword [esp + 0x50], ecx
mov edx, dword [eax + esi + 0x10]
cmp dword [eax + esi + 8], edx
cmovb ecx, edx
mov dword [esp + 0x50], ecx
mov ecx, dword [eax + esi + 0xc]
lea eax, [eax + esi]
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0xe4]
push ecx
push eax
call fcn.00402220
add esp, 8
test eax, eax
jne 0x413740
mov eax, dword [esp + 0x44]
add eax, dword [esp + 0x54]
push 4
push 0x1000
push dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x10]
push dword [eax + 0x84]
call fcn.004180f0
add esp, 0x14
test eax, eax
mov dword [esp + 0x40], eax
je 0x413c1d
push dword [esp + 0x4c]
push dword [esp + 0x54]
call fcn.0040ac80
add esp, 8
mov dword [esp + 0x4c], eax
push dword [esp + 0x50]
push eax
push dword [esp + 0x48]
mov eax, dword [esp + 0xc]
push dword [eax + 0x84]
call fcn.00418110
add esp, 0x10
test eax, eax
je 0x413c1d
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + esi + 0x10]
test eax, eax
je 0x413740
mov edx, dword [esp + 0x30]
add edx, dword [ecx + esi + 0x14]
push eax
push edx
push dword [esp + 0x48]
mov eax, dword [esp + 0xc]
push dword [eax + 0x84]
call fcn.00418110
add esp, 0x10
test eax, eax
je 0x413c1d
mov eax, dword [esp + 0x2c]
inc ebx
add esi, 0x28
movzx ecx, word [eax + 6]
cmp ebx, ecx
jl 0x413664
cmp dword [esp + 0x58], 0
je 0x4138c7
push dword [eax + 0xa0]
push dword [esp + 0x34]
call fcn.00408680
add esp, 8
test eax, eax
mov dword [esp + 0x1c], eax
je 0x4138c7
cmp dword [eax], 0
je 0x4138c7
lea ebx, [esp + 0x7c]
lea esi, [esp + 0x80]
xor ecx, ecx
mov edx, 0xfffffff8
sub ecx, dword [eax + 4]
add eax, 8
sub edx, ecx
lea ecx, [esp + 0x78]
shr edx, 1
test edx, edx
mov dword [esp + 0x74], edx
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 0
mov dword [ecx + 4], 0
mov dword [ecx], 0
mov dword [esp + 0x98], eax
je 0x4138af
movzx eax, word [eax]
mov ecx, eax
shr ecx, 0xc
cmp cl, 0xa
je 0x413826
cmp cl, 3
jne 0x413894
mov ecx, dword [esp + 0x1c]
mov edx, eax
xor edx, 0xf000
and edx, eax
neg edx
mov ecx, dword [ecx]
sub ecx, edx
mov dword [esp + 0x78], ecx
push ecx
push dword [esp + 0x34]
call fcn.00408680
add esp, 8
mov ecx, dword [esp + 0x58]
add ecx, dword [eax]
mov dword [esp + 0x7c], ecx
mov eax, dword [esp + 0x44]
add eax, dword [esp + 0x78]
push 4
push ebx
jmp 0x413879
mov ecx, dword [esp + 0x1c]
mov edx, eax
xor edx, 0xf000
and edx, eax
add edx, dword [ecx]
mov dword [esp + 0x78], edx
push edx
push dword [esp + 0x34]
call fcn.00408680
add esp, 8
xor edx, edx
mov ecx, dword [esp + 0x58]
mov edi, 0
sub edx, dword [eax]
sbb edi, dword [eax + 4]
sub ecx, edx
mov eax, 0
mov dword [esp + 0x80], ecx
sbb eax, edi
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x44]
add eax, dword [esp + 0x78]
push 8
push esi
push eax
mov eax, dword [esp + 0xc]
push dword [eax + 0x84]
call fcn.00418110
add esp, 0x10
test eax, eax
je 0x413c1d
mov eax, dword [esp + 0x98]
add eax, 2
mov dword [esp + 0x98], eax
dec dword [esp + 0x74]
jne 0x4137d4
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 4]
lea eax, [ecx + edx]
mov dword [esp + 0x1c], eax
cmp dword [ecx + edx], 0
jne 0x413791
push 0x4c
lea eax, [esp + 0xe8]
push eax
call fcn.00411ab0
add esp, 8
mov eax, dword [esp + 0x2c]
mov edi, dword [esp]
cmp word [eax + 6], 0
je 0x4139d6
xor esi, esi
xor ebx, ebx
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0xe4]
add eax, esi
push ecx
push eax
call fcn.00402220
add esp, 8
test eax, eax
jne 0x4139c2
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [eax + esi + 0x24]
mov dword [esp + 4], 0x70
mov edi, dword [esp + 4]
mov ecx, eax
mov edx, eax
not ecx
sar edx, 0x1f
or ecx, 0xdfffffff
not edx
mov dword [esp + 0xc], ecx
mov ecx, eax
xor ecx, 0xbfffffff
and ecx, eax
mov eax, 0
sete al
mov dword [esp + 0x10], eax
mov eax, 0x20
cmovne edi, eax
mov eax, ecx
shr ecx, 0x1a
shr eax, 0x1e
mov dword [esp + 4], edi
mov edi, 1
add ecx, 0x10
neg eax
sub edi, eax
mov eax, dword [esp + 0x10]
cmp dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov edi, dword [esp]
lea eax, [eax + eax*4 + 2]
cmove ecx, dword [esp + 8]
cmovne eax, dword [esp + 4]
neg ecx
not eax
or edx, eax
not edx
sub ecx, edx
mov edx, dword [esp + 0x14]
neg ecx
mov dword [esp + 0xc0], ecx
mov eax, dword [esp + 0x44]
add eax, dword [edx + esi + 0xc]
push ecx
push dword [edx + esi + 8]
push eax
push dword [edi + 0x84]
call fcn.00405740
add esp, 0x10
mov eax, dword [esp + 0x2c]
inc ebx
add esi, 0x28
movzx eax, word [eax + 6]
cmp ebx, eax
jl 0x4138ef
mov eax, dword [esp + 0x44]
mov ecx, edi
mov dword [edi + 0x54], eax
push 0
push 1
push dword [esp + 0x38]
call fcn.0040e170
test eax, eax
jne 0x4139fd
mov eax, dword [esp]
cmp dword [eax + 0x58], 0
je 0x413c1d
mov esi, dword [esp]
mov dword [esi + 0x64], 1
jmp 0x413c2d
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x6c]
push ebx
push esi
call fcn.00408680
add esp, 8
mov edi, eax
test edi, edi
mov dword [esp + 0x28], edi
je 0x413c1d
push dword [edi + 0x1c]
push esi
call fcn.00408680
add esp, 8
mov dword [esp + 4], ebx
mov ebx, eax
mov dword [esp + 0xa4], ebx
push dword [edi + 0x20]
push esi
call fcn.00408680
add esp, 8
mov dword [esp + 0xa8], eax
push dword [edi + 0x24]
push esi
call fcn.00408680
add esp, 8
mov ecx, dword [esp + 4]
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], ecx
neg ecx
mov eax, dword [esp + 0x70]
sub eax, ecx
mov dword [esp + 0xb4], eax
cmp dword [edi + 0x14], 0
je 0x413b5e
xor esi, esi
jmp 0x413a9a
mov ebx, dword [esp + 0xa4]
lea eax, [ebx + 4]
mov dword [esp + 0xa4], eax
mov eax, dword [ebx]
test eax, eax
mov dword [esp + 0xb8], eax
je 0x413b50
mov ecx, dword [esp + 0xb0]
cmp eax, ecx
setae dl
cmp eax, dword [esp + 0xb4]
setb dh
xor dh, dl
jne 0x413ad3
cmp eax, ecx
jae 0x413b50
cmp dword [edi + 0x18], 0
je 0x413b50
mov ecx, dword [esp + 0xac]
xor eax, eax
movzx edx, word [ecx + eax*2]
cmp edx, esi
je 0x413af2
inc eax
cmp eax, dword [edi + 0x18]
jb 0x413ae2
jmp 0x413b50
mov dword [esp + 0xbc], 0
mov ecx, dword [esp + 0xa8]
push dword [ecx + eax*4]
push dword [esp + 0x34]
call fcn.00408680
add esp, 8
test eax, eax
mov dword [esp + 0xbc], eax
je 0x413b50
mov ecx, dword [esp]
push esi
lea eax, [esp + 0x1c]
push eax
call fcn.00411ad0
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x3c], eax
cmp byte [eax], 0
je 0x413b50
mov byte [eax], 0
mov ecx, dword [esp + 0x3c]
lea eax, [ecx + 1]
mov dword [esp + 0x3c], eax
cmp byte [ecx + 1], 0
jne 0x413b3c
mov edi, dword [esp + 0x28]
inc esi
cmp esi, dword [edi + 0x14]
jb 0x413a93
mov edi, dword [esp]
xor ecx, ecx
mov eax, dword [edi + 0x9c]
test eax, eax
jne 0x413b8a
mov eax, dword [esp + 0xd4]
test eax, eax
jne 0x413b84
mov eax, dword [esp + 0xc4]
mov ecx, 1
mov dword [edi + 0x9c], eax
mov edx, dword [edi + 0xa0]
test edx, edx
jne 0x413bb5
cmp dword [esp + 0xd8], 0
lea edx, [esp + 0xd8]
lea esi, [esp + 0xc8]
cmovne esi, edx
mov edx, dword [esi]
mov dword [edi + 0xa0], edx
cmp dword [edi + 0xa4], 0
jne 0x413bda
mov esi, dword [esp + 0xdc]
test esi, esi
jne 0x413bd4
test ecx, ecx
je 0x413bda
mov esi, dword [esp + 0xcc]
mov dword [edi + 0xa4], esi
cmp dword [edi + 0xa8], 0
jne 0x413c07
mov esi, dword [esp + 0xe0]
test esi, esi
je 0x413bf6
mov dword [edi + 0xa8], esi
jmp 0x413c07
test ecx, ecx
je 0x413c07
mov ecx, dword [esp + 0xd0]
mov dword [edi + 0xa8], ecx
test eax, eax
sete cl
test edx, edx
sete ch
or eax, edx
je 0x413c1d
xor cl, ch
je 0x41362f
mov esi, dword [esp]
cmp dword [esi + 0x64], 0
jne 0x413c2d
mov ecx, esi
call fcn.004083b0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x413c3e
push eax
call fcn.004193e0
add esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x413c4f
push eax
call fcn.004193e0
add esp, 4
mov eax, dword [esi + 0x64]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 4