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

Disassembly:
sub esp, 0x158
mov eax, dword [0x410090]
push 0xf003f
push 0
push 0
mov dword [esp + 0x160], eax
call dword [0x40d018]
test eax, eax
mov dword [esp + 8], eax
jne 0x402233
push 0x40d3e0
push 1
call fcn.00403188
pop ecx
pop ecx
xor eax, eax
jmp 0x402638
push ebx
push ebp
push esi
mov esi, dword [0x40d014]
push edi
push 0xf01ff
mov ebx, 0x40d3d4
push ebx
push eax
call esi
test eax, eax
mov edi, dword [0x40d0ec]
mov dword [esp + 0x10], eax
mov ebp, 0x2ee
je 0x4022c2
lea ecx, [esp + 0x20]
push ecx
push 1
push eax
call dword [0x40d034]
mov eax, 0x1388
cmp dword [esp + 0x38], eax
jg 0x40227b
mov eax, dword [esp + 0x38]
add eax, 0x7d0
push eax
call edi
push dword [esp + 0x10]
call dword [0x40d004]
push dword [esp + 0x10]
call dword [0x40d008]
push ebp
call edi
push 0xf01ff
push ebx
push dword [esp + 0x20]
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x4022c2
push eax
call dword [0x40d004]
push dword [esp + 0x10]
call dword [0x40d008]
push ebp
call edi
push 0xf01ff
push ebx
push dword [esp + 0x20]
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x402321
push ebp
call edi
push dword [esp + 0x10]
call dword [0x40d004]
push dword [esp + 0x10]
call dword [0x40d008]
push ebp
call edi
push 0xf01ff
push ebx
push dword [esp + 0x20]
call esi
test eax, eax
je 0x402321
mov esi, dword [0x40d008]
push eax
call esi
push dword [esp + 0x18]
call esi
push 0x40d3a8
push 1
call fcn.00403188
pop ecx
jmp 0x402631
mov esi, dword [esp + 0x16c]
push 0x40d3a4
push esi
call fcn.004055bb
test eax, eax
pop ecx
pop ecx
mov dword [esp + 0x10], eax
mov byte [esp + 0x3c], 0x31
mov byte [esp + 0x3d], 0
je 0x402356
lea ecx, [esp + 0x3c]
push ecx
push esi
mov ecx, eax
call fcn.0040211d
pop ecx
pop ecx
mov ebx, dword [0x40d0f0]
call ebx
mov dword [esp + 0x14], eax
call fcn.0040588e
cdq
mov ecx, 0x320
idiv ecx
add edx, 0x12c
mov dword [esp + 0x1c], edx
call ebx
sub eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jle 0x402379
push dword [esp + 0x10]
call fcn.00404cf0
mov dword [esp], 0x40d234
push esi
call fcn.004055bb
cmp dword [0x41151c], 3
pop ecx
pop ecx
mov ebx, eax
mov dword [esp + 0x10], ebx
push esi
jge 0x402618
call fcn.0040446f
test eax, eax
pop ecx
jne 0x4023d0
push dword [esp + 0x18]
call dword [0x40d008]
push esi
push 0x40d36c
jmp 0x40261d
push 0xf6
mov esi, 0x410c00
push esi
call dword [0x40d0f4]
cmp byte [0x410c00], 0
mov ebx, 0x104
je 0x40240e
push esi
call fcn.00404c19
pop ecx
mov ecx, esi
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x40240e
push 0x40d368
push ebx
push esi
call fcn.004020c9
add esp, 0xc
push 0x40d358
push ebx
push esi
call fcn.004020c9
push 0x180
push esi
call fcn.0040d709
lea eax, [esp + 0x70]
push esi
push eax
call fcn.00405789
and dword [esp + 0x30], 0
lea eax, [esp + 0x78]
add esp, 0x1c
dec eax
mov dword [esp + 0x1c], eax
mov bl, byte [esp + 0x14]
lea eax, [esp + 0x5c]
push eax
add bl, 0x30
call fcn.00404c19
mov ecx, dword [esp + 0x20]
mov byte [eax + ecx], bl
lea eax, [esp + 0x60]
push eax
call fcn.0040575f
lea eax, [esp + 0x64]
push eax
push esi
call fcn.00405731
add esp, 0x10
test eax, eax
je 0x402480
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 0xa
jl 0x402441
push ebp
call edi
mov ebx, dword [0x40d0f8]
push 0
push esi
push dword [esp + 0x174]
call ebx
test eax, eax
jne 0x4024f4
push ebp
call edi
mov dword [esp + 0x14], 1
push ebp
call edi
push 0
push esi
push dword [esp + 0x174]
call ebx
test eax, eax
jne 0x4024c1
dec dword [esp + 0x14]
cmp dword [esp + 0x14], eax
jg 0x4024a4
cmp dword [esp + 0x14], 1
jge 0x4024f4
call dword [fcn.0040d0fc]
push eax
push esi
push dword [esp + 0x174]
push 0x40d324
push 1
call fcn.00403188
push dword [esp + 0x24]
call fcn.00404cf0
add esp, 0x18
jmp 0x402632
mov edi, dword [esp + 0x10]
xor ebx, ebx
cmp edi, ebx
je 0x402519
push edi
call fcn.00404cf0
mov dword [esp], 0x40d234
push esi
call fcn.004055bb
pop ecx
pop ecx
mov dword [esp + 0x10], eax
mov edi, eax
cmp edi, ebx
mov byte [esp + 0x4c], 0x32
mov byte [esp + 0x4d], 0
je 0x402536
lea eax, [esp + 0x4c]
push eax
push esi
mov ecx, edi
call fcn.0040211d
pop ecx
pop ecx
push 0x10
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.00405679
add esp, 0xc
test eax, eax
je 0x402571
push dword [esp + 0x18]
call dword [0x40d008]
push dword [esp + 0x16c]
push esi
push 0x40d300
push 1
call fcn.00403188
add esp, 0x10
jmp 0x4025d2
push ebx
mov ebp, dword [esp + 0x1c]
push ebx
push ebx
push ebx
push ebx
push esi
push 1
push 2
push 0x10
push 0xf01ff
mov eax, 0x40d2f4
push eax
push eax
push ebp
call dword [0x40d00c]
mov esi, eax
cmp esi, ebx
jne 0x4025d9
mov esi, dword [fcn.0040d0fc]
call esi
cmp eax, 0x431
jne 0x4025b9
push 0x40d2cc
push 1
call fcn.00403188
pop ecx
pop ecx
jmp 0x4025cb
call esi
push eax
push 0x40d2a8
push 1
call fcn.00403188
add esp, 0xc
push ebp
call dword [0x40d008]
cmp edi, ebx
je 0x402632
push edi
jmp 0x40262c
cmp edi, ebx
je 0x4025e4
push edi
call fcn.00404cf0
pop ecx
push ebx
push ebx
push esi
call dword [0x40d010]
test eax, eax
jne 0x402607
call dword [fcn.0040d0fc]
push eax
push 0x40d278
push 1
call fcn.00403188
add esp, 0xc
push esi
mov esi, dword [0x40d008]
call esi
push ebp
call esi
xor eax, eax
inc eax
jmp 0x402634
push 0x40d238
push 1
call fcn.00403188
add esp, 0xc
test ebx, ebx
je 0x402632
push ebx
call fcn.00404cf0
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x154]
call fcn.0040566a
add esp, 0x158
ret