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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40fa30
sub esp, 0x74
mov edx, dword [esp + 0x84]
movzx ebx, byte [edx + 0xf]
mov ebp, dword [esp + 0x78]
mov esi, ebp
shr ebp, 2
and ebp, 0x1f
mov edi, ebp
shl ebp, 2
mov eax, esi
sub esi, ebp
test bl, 0x40
jne 0x40f58d
mov ebx, dword [edx + 4]
shr ebx, 2
mov ebp, dword [edx]
mov ecx, ebx
mov ebx, dword [esp + 0x80]
cmp ebx, ebp
je 0x40f542
mov dword [esp + 0x5c], ebp
shr ebp, 2
cmp ebp, 0x20
ja 0x40f529
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x5c]
test ebp, ebp
je 0x40fa2a
mov edx, dword [edx + 0x14]
mov dword [esp + 0x60], edx
mov eax, ebx
xor edx, edx
div ebp
mov edx, dword [esp + 0x60]
mov edx, dword [edx]
mov ebp, dword [esp + 0x28]
mov ebx, edi
xor edi, edi
mov dword [esp + 0x50], edi
mov edi, ebx
jmp 0x40f90a
mov dword [esp + 0x5c], ecx
mov ebp, edi
xor edi, edi
mov dword [esp + 0x50], edi
xor edi, edi
mov dword [esp + 0x44], edi
mov edi, ebp
jmp 0x40f825
cmp ecx, 0x20
jbe 0x40f553
mov edx, dword [edx + 0x14]
xor ebx, ebx
mov ebp, edi
jmp 0x40f74e
mov eax, dword [edx + 0x14]
mov eax, dword [eax]
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 8], edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
call fcn.0040f090
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
jmp 0x40f711
mov dword [esp + 0x5c], edi
mov dword [esp + 0x54], esi
mov dword [esp + 0x70], eax
mov ebx, dword [edx + 0x14]
add ebx, 4
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0040fb10
mov eax, dword [esp + 8]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x5c]
mov edx, ecx
xor ebx, ebx
mov ebp, dword [esp + 0x54]
xor esi, esi
jmp 0x40f608
mov dword [esp], ebp
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x34]
shl eax, 2
sub ecx, eax
mov dword [esp + 0x10], ecx
call fcn.0040f1e0
mov eax, dword [esp + 0x84]
mov ecx, dword [eax]
mov edx, dword [esp + 0x48]
lea esi, [edx + ecx]
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x48], esi
mov edi, eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x6c], eax
mov eax, edi
jmp 0x40f6c5
mov esi, dword [esp + 0x6c]
movzx esi, byte [esi]
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
call fcn.0040f090
mov eax, dword [esp + 0x84]
mov ecx, dword [eax]
mov edx, dword [esp + 0x48]
lea ebx, [edx + ecx]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x80]
cmp eax, ebx
jne 0x40f5c3
jmp 0x40f6cf
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x6c]
movzx esi, byte [eax]
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 8
call fcn.0040f090
nop
mov eax, dword [esp + 0x40]
add eax, 0xfffffff8
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x6c]
inc esi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x48]
cmp eax, 8
ja 0x40f671
jmp 0x40f61d
mov dword [esp], ebp
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x14], eax
call fcn.0040f2d0
mov eax, dword [esp + 0x70]
mov dword [esp], eax
mov eax, dword [esp + 0x34]
add eax, 7
shr eax, 3
mov dword [esp + 4], eax
call fcn.00451ad0
add esp, 0x74
ret
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x14], eax
call fcn.0040f2d0
add esp, 0x74
ret
mov esi, eax
mov eax, dword [esp + 0x68]
add eax, 4
mov edi, edx
mov edx, eax
mov eax, ebx
mov ebx, ecx
mov ecx, ebp
mov ebp, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x68], edx
mov eax, dword [edx]
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x20
call fcn.0040f090
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
nop
mov ebp, dword [esp + 0x2c]
add ebp, 0xffffffe0
cmp ebp, 0x20
ja 0x40f739
nop
mov esi, dword [esp + 0x68]
mov esi, dword [esi + 4]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebp
call fcn.0040f090
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
jmp 0x40f711
mov ecx, dword [eax + 4]
mov dword [esp], ebp
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x58]
sub edx, ecx
mov dword [esp + 0x10], edx
call fcn.0040f1e0
mov edx, dword [esp + 0x84]
mov eax, dword [edx]
mov ecx, dword [esp + 0x44]
add eax, ecx
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x5c]
mov eax, dword [edx + 0x14]
jmp 0x40f8e5
mov eax, dword [eax]
mov dword [esp], esi
mov edx, dword [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
call fcn.0040f090
mov eax, dword [esp + 0x84]
mov ecx, dword [eax]
mov dword [esp + 0x58], ecx
mov edx, dword [esp + 0x44]
lea ebx, [edx + ecx]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x80]
cmp ecx, ebx
jne 0x40f7ce
jmp 0x40f8ef
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x64], eax
mov ecx, dword [eax]
mov dword [esp], esi
mov edx, dword [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], 0x20
call fcn.0040f090
nop
mov eax, dword [esp + 0x3c]
lea ecx, [eax - 0x20]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x64]
add edx, 4
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x50], eax
mov eax, edx
mov edx, dword [esp + 0x84]
cmp ecx, 0x20
ja 0x40f884
jmp 0x40f82d
mov ebx, edx
mov edx, edi
mov ecx, esi
mov eax, ebp
jmp 0x40f711
mov ebp, dword [esp + 0x50]
mov ebp, ecx
mov ecx, edx
mov edx, ebx
mov ebx, dword [esp + 0x4c]
cmp ebp, 0x10
ja 0x40f999
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], edx
test eax, 1
je 0x40f96e
mov dword [esp + 0x58], ebp
mov dword [esp + 0x30], eax
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
call fcn.0040f090
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x38]
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x4c], ebx
shr eax, 1
mov ecx, ebp
shl edx, cl
mov ebx, dword [esp + 0x38]
or ebx, edx
mov edx, dword [esp + 0x2c]
add edx, ecx
shl ecx, 1
cmp eax, 1
jne 0x40f8fc
mov ebp, ecx
mov ecx, edx
mov edx, ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x28], ebp
jmp 0x40f9f0
mov dword [esp + 0x30], eax
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
call fcn.0040f090
mov eax, dword [esp + 0x30]
dec eax
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x2c]
cmp eax, 1
ja 0x40f9a7
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
call fcn.0040f090
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
jmp 0x40f8ef
call fcn.0042d430
nop
call fcn.0044ffd0
jmp fcn.0040f490