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

Disassembly:
mov ecx, dword [0x4e99a4]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40fed5
sub esp, 0x6c
mov eax, dword [0x4e9cf8]
test eax, eax
jne 0x40fb30
mov eax, dword [esp + 0x70]
test eax, eax
je 0x40febe
movzx ecx, byte [eax + 0xf]
and ecx, 0x1f
cmp cl, 0x16
jne 0x40fe62
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x40fe4c
nop
mov ecx, dword [esp + 0x74]
mov edx, dword [0x4c9994]
test byte [edx], al
mov ebx, ecx
shr ecx, 0x16
mov ecx, dword [edx + ecx*4]
test ecx, ecx
je 0x40f8b9
mov edx, ebx
shr ebx, 0xd
and ebx, 0x1ff
mov ecx, dword [ecx + ebx*4 + 0x21000]
jmp 0x40f8bd
mov edx, ebx
xor ecx, ecx
mov dword [esp + 0x44], eax
test ecx, ecx
je 0x40f8d1
movzx ecx, byte [ecx + 0x41]
test cl, cl
jne 0x40fe36
mov dword [esp], edx
mov dword [esp + 4], 0
mov dword [esp + 8], 0
call fcn.0040c180
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x40f90e
mov eax, dword [esp + 0x74]
lea ecx, [0x4e98a0]
cmp eax, ecx
je 0x40fde4
lea ecx, [0x4c19a0]
jmp 0x40fdf0
mov ebp, dword [esp + 0x74]
mov esi, ebp
cmp ebp, eax
je 0x40f93c
mov ebp, dword [esp + 0x44]
mov edi, dword [ebp + 0x20]
test edi, edi
je 0x40fdce
mov eax, dword [edi + 4]
test eax, eax
jne 0x40fdce
cmp dword [edi], 0x10
jb 0x40f940
jmp 0x40fdce
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x78]
test edi, edi
je 0x40fafe
movzx eax, byte [edi + 0xf]
and eax, 0x1f
cmp al, 0x13
jne 0x40fd72
mov dword [esp + 0x3c], edi
movzx eax, word [edi + 0x22]
test ax, 0x8000
jne 0x40fcd8
cmp word [edi + 0x20], 1
jne 0x40fc50
movzx eax, byte [edi + 0xc]
test al, 1
je 0x40f989
mov eax, 0x34
jmp 0x40f98e
mov eax, 0x24
mov eax, dword [edi + eax]
mov dword [esp + 0x40], eax
cmp eax, ebp
je 0x40fa97
movzx ecx, byte [eax + 0xf]
and ecx, 0x1f
cmp cl, 0x16
jne 0x40fa5b
movzx esi, byte [eax + 0xc]
xchg esi, eax
test al, 1
xchg esi, eax
jne 0x40f9bc
xor esi, esi
jmp 0x40f9bf
lea esi, [eax + 0x24]
test esi, esi
je 0x40fa3f
movzx esi, byte [ebp + 0xc]
xchg esi, eax
test al, 1
xchg esi, eax
jne 0x40f9d2
xor esi, esi
jmp 0x40fa31
movzx esi, byte [ebp + 0xf]
and esi, 0x1f
cmp esi, 0x14
ja 0x40fa06
cmp esi, 0x12
ja 0x40f9f7
cmp esi, 0x11
jne 0x40f9ed
lea esi, [ebp + 0x2c]
jmp 0x40fa31
cmp esi, 0x12
jne 0x40fa2e
lea esi, [ebp + 0x28]
jmp 0x40fa31
cmp esi, 0x13
jne 0x40fa01
lea esi, [ebp + 0x24]
jmp 0x40fa31
lea esi, [ebp + 0x30]
jmp 0x40fa31
cmp esi, 0x16
ja 0x40fa1a
cmp esi, 0x15
jne 0x40fa15
lea esi, [ebp + 0x38]
jmp 0x40fa31
lea esi, [ebp + 0x24]
jmp 0x40fa31
cmp esi, 0x17
jne 0x40fa24
lea esi, [ebp + 0x24]
jmp 0x40fa31
cmp esi, 0x19
jne 0x40fa2e
lea esi, [ebp + 0x30]
jmp 0x40fa31
lea esi, [ebp + 0x20]
test esi, esi
xchg esi, ebx
setne bl
xchg esi, ebx
xor esi, 1
jmp 0x40fa44
mov esi, 1
xchg esi, eax
test al, al
xchg esi, eax
je 0x40fbc4
mov esi, dword [eax + 0x20]
cmp dword [ebp + 0x20], esi
je 0x40fa97
jmp 0x40fbc4
cmp cl, 0x14
jne 0x40fbc4
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x40fa97
mov ecx, dword [esp + 0x70]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
call fcn.00406060
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40fbc4
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x3c]
movzx esi, word [edi + 0x22]
and esi, 0x7fff
nop
test si, si
jne 0x40faad
xor ecx, ecx
xor edx, edx
jmp 0x40faf8
movzx ecx, byte [edi + 0xc]
test cl, 1
je 0x40fabd
mov ecx, 0x34
jmp 0x40fac2
mov ecx, 0x24
movzx edx, word [edi + 0x20]
add esi, edx
movzx esi, si
add edi, ecx
cmp esi, 0x20000
ja 0x40fbb8
movzx edx, dx
cmp edx, esi
ja 0x40fbaf
sub esi, edx
mov ecx, esi
xchg esi, ebx
neg ebx
xchg esi, ebx
shl edx, 2
sar esi, 0x1f
and edx, esi
add edx, edi
xor ebx, ebx
xor esi, esi
jmp 0x40fb4e
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
lea eax, [0x40ff50]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x70]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x4c]
mov dword [esp], eax
call fcn.0044bc00
add esp, 0x6c
ret
add esp, 0x6c
ret
mov edi, dword [edx + ebx*4]
movzx ebp, byte [edi + 0xd]
lea esi, [esi + ebp - 1]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
and esi, ebp
inc ebx
add esi, dword [edi]
mov ebp, dword [esp + 0x44]
cmp ebx, ecx
jl 0x40fb34
lea eax, [esi + 3]
and eax, 0xfffffffc
mov dword [esp + 0x34], eax
nop
call fcn.0040f360
lea edi, [esp + 0x54]
xor eax, eax
call fcn.0044d28a
lea eax, [0x40fee0]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x70]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x78]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x54]
mov dword [esp], eax
call fcn.0044bc00
add esp, 0x6c
ret
mov eax, edx
mov ecx, esi
call fcn.0044d1e0
mov edx, esi
mov ebx, 0x20000
call fcn.0044d1c0
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00446ac0
mov eax, dword [esp + 4]
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 8]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x3c]
mov dword [esp], edx
call fcn.00446ac0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp], 0
lea edx, [0x46d1ca]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x22
mov edx, dword [esp + 0x48]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x10], edx
lea edx, [0x46a45b]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0xe
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
call fcn.0043f6c0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0042c470
mov dword [esp], ebp
call fcn.00446ac0
mov eax, dword [esp + 4]
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 8]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x3c]
mov dword [esp], edx
call fcn.00446ac0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp], 0
lea edx, [0x46d1ca]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x22
mov edx, dword [esp + 0x48]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x10], edx
lea edx, [0x46a45b]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0xe
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
call fcn.0043f6c0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0042c470
mov dword [esp], ebp
call fcn.00446ac0
mov eax, dword [esp + 4]
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 8]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x3c]
mov dword [esp], edx
call fcn.00446ac0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp], 0
lea edx, [0x46d1ca]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x22
mov edx, dword [esp + 0x48]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x10], edx
lea edx, [0x46a45b]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0xe
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
lea eax, [0x46ac3c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 0x12
call fcn.0043f770
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0042c470
mov dword [esp], edi
call fcn.00446ac0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp], 0
lea edx, [0x46dcaa]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x29
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
lea eax, [0x46a832]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0x10
call fcn.0043f630
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0042c470
lea eax, [0x46ef4b]
mov dword [esp], eax
mov dword [esp + 4], 0x41
call fcn.0042c470
add esp, 0x6c
ret
mov ecx, dword [ecx + 0x124]
mov eax, edx
test ecx, ecx
je 0x40fe20
mov edx, eax
cmp dword [ecx + 0x60], eax
ja 0x40fe00
cmp dword [ecx + 0x64], eax
ja 0x40fde4
cmp dword [ecx + 0x68], eax
ja 0x40fe0a
cmp dword [ecx + 0x6c], eax
ja 0x40fde4
cmp dword [ecx + 0x70], eax
ja 0x40fe14
cmp dword [ecx + 0x74], eax
ja 0x40fde4
cmp dword [ecx + 0x78], eax
ja 0x40fde8
cmp dword [ecx + 0x7c], eax
jbe 0x40fde8
jmp 0x40fde4
lea eax, [0x46ea52]
mov dword [esp], eax
mov dword [esp + 4], 0x34
call fcn.0042c470
lea eax, [0x46ee8a]
mov dword [esp], eax
mov dword [esp + 4], 0x40
call fcn.0042c470
lea eax, [0x46a44d]
mov dword [esp], eax
mov dword [esp + 4], 0xe
call fcn.0042c470
mov dword [esp], eax
call fcn.00446ac0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp], 0
lea edx, [0x46db40]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x28
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
lea eax, [0x46a26e]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0xd
call fcn.0043f630
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0042c470
lea eax, [0x46df97]
mov dword [esp], eax
mov dword [esp + 4], 0x2b
call fcn.0042c470
nop
call fcn.0044bcf0
jmp fcn.0040f840