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

Disassembly:
sub esp, 0x84
mov eax, dword [0x5c9040]
xor eax, esp
mov dword [esp + 0x7c], eax
push ebx
push ebp
push esi
push edi
push 1
lea eax, [esp + 0x3c]
mov ebp, edx
push eax
mov esi, ecx
xorps xmm0, xmm0
push ebp
mov dword [esp + 0x38], esi
movlpd qword [esp + 0x44], xmm0
call dword [ebp + 0xc]
add esp, 0xc
test eax, eax
jne 0x40f9d5
push 0x11
push 0x20
lea edx, [esp + 0x74]
mov ecx, ebp
call fcn.0040d2db
pop ecx
pop ecx
test eax, eax
jne 0x40f9d5
xor ebx, ebx
mov ecx, ebx
mov al, byte [esp + ecx + 0x6c]
cmp al, byte [ecx + 0x55f7a0]
jne 0x40f9d2
inc ecx
cmp ecx, 6
jb 0x40f63b
cmp byte [esp + 0x72], bl
je 0x40f65e
push 4
jmp 0x40f9d4
movzx edi, byte [esp + 0x7f]
xor edx, edx
movzx eax, byte [esp + 0x7e]
movzx ecx, byte [esp + 0x7b]
shl ecx, 8
shl edi, 8
or edi, eax
movzx eax, byte [esp + 0x7d]
shl edi, 8
or edi, eax
movzx eax, byte [esp + 0x7c]
shl edi, 8
or edi, eax
movzx eax, byte [esp + 0x7a]
or ecx, eax
or edi, ebx
movzx eax, byte [esp + 0x79]
movzx ebx, byte [esp + 0x87]
shl ecx, 8
or ecx, eax
shl ebx, 8
movzx eax, byte [esp + 0x78]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x86]
or edx, ecx
or ebx, eax
movzx eax, byte [esp + 0x85]
movzx ecx, byte [esp + 0x83]
shl ecx, 8
shl ebx, 8
or ebx, eax
mov dword [esp + 0x18], edx
movzx eax, byte [esp + 0x84]
xor edx, edx
shl ebx, 8
or ebx, eax
movzx eax, byte [esp + 0x82]
or ecx, eax
movzx eax, byte [esp + 0x81]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x80]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x8a]
or edx, ecx
movzx ecx, byte [esp + 0x8b]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x20], edx
movzx eax, byte [esp + 0x89]
lea edx, [esp + 0x78]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x88]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x38]
add ecx, 0x20
push 0x608c40
adc eax, 0
mov dword [esi + 0x30], ecx
push 0x14
or ecx, 0xffffffff
mov dword [esi + 0x34], eax
call dword [0x608c38]
movzx edx, byte [esp + 0x77]
mov esi, eax
movzx ecx, byte [esp + 0x76]
not esi
movzx eax, byte [esp + 0x74]
shl edx, 8
or edx, ecx
movzx ecx, byte [esp + 0x75]
shl edx, 8
or edx, ecx
shl edx, 8
or edx, eax
cmp esi, edx
je 0x40f7a1
push 3
jmp 0x40f9d4
mov eax, dword [esp + 0x20]
xor edx, edx
cmp edx, ebx
jne 0x40f9ce
test eax, eax
je 0x40f9d5
mov esi, dword [esp + 0x18]
add eax, esi
mov dword [esp + 0x18], eax
adc ebx, edi
cmp edi, ebx
ja 0x40f9d2
jb 0x40f7d5
cmp esi, eax
ja 0x40f9d2
mov ecx, eax
mov eax, ebx
add ecx, 0x20
adc eax, edx
cmp edi, eax
ja 0x40f9d2
jb 0x40f7f0
cmp esi, ecx
ja 0x40f9d2
push 2
lea eax, [esp + 0x14]
xorps xmm0, xmm0
push eax
push ebp
movlpd qword [esp + 0x1c], xmm0
call dword [ebp + 0xc]
add esp, 0xc
test eax, eax
jne 0x40f9d5
add esi, dword [esp + 0x38]
adc edi, dword [esp + 0x3c]
cmp dword [esp + 0x14], edi
jb 0x40f9ca
ja 0x40f82d
cmp dword [esp + 0x10], esi
jb 0x40f9ca
add esi, 0x20
push 0
pop ecx
adc edi, ecx
cmp dword [esp + 0x14], edi
jb 0x40f9ca
ja 0x40f84b
cmp dword [esp + 0x10], esi
jb 0x40f9ca
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x38]
adc ebx, dword [esp + 0x3c]
add eax, 0x20
adc ebx, ecx
cmp dword [esp + 0x14], ebx
jb 0x40f9ca
ja 0x40f872
cmp dword [esp + 0x10], eax
jb 0x40f9ca
push edi
push esi
mov ecx, ebp
call fcn.0040d2bd
pop ecx
pop ecx
test eax, eax
jne 0x40f9d5
mov edi, dword [esp + 0x20]
mov edx, edi
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040fbc1
pop ecx
test eax, eax
je 0x40f9ce
mov ebx, dword [esp + 0x18]
mov ecx, ebp
push 6
push edi
mov edx, ebx
call fcn.0040d2db
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40f9bd
push 0x10
pop esi
mov edx, edi
mov ecx, ebx
call fcn.0040cf19
cmp eax, dword [esp + 0x30]
jne 0x40f9bd
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x20]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
call fcn.0040d547
mov esi, eax
test esi, esi
jne 0x40f9bd
mov eax, dword [esp + 0x20]
xor ecx, ecx
cmp eax, 0x17
jne 0x40f996
cmp dword [esp + 0x24], ecx
jne 0x40f996
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x40]
call fcn.0040d40e
mov edi, dword [esp + 0x2c]
lea edx, [esp + 0x10]
push ecx
mov eax, ecx
mov ecx, ebp
push eax
push dword [edi + 0x34]
lea eax, [esp + 0x3c]
push dword [edi + 0x30]
push 1
push eax
call fcn.0040e805
add esp, 0x18
lea ecx, [esp + 0x40]
mov esi, eax
call fcn.0040d431
test esi, esi
je 0x40f95a
lea ecx, [esp + 0x30]
call fcn.0040fbf4
jmp 0x40f9bd
lea ecx, [esp + 0x18]
call fcn.0040fbf4
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x20]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], eax
call fcn.0040d547
mov esi, eax
test esi, esi
jne 0x40f9bd
mov eax, dword [esp + 0x20]
xor ecx, ecx
jmp 0x40f99a
mov edi, dword [esp + 0x2c]
cmp eax, 1
jne 0x40f9ba
cmp dword [esp + 0x24], ecx
jne 0x40f9ba
push ecx
push ecx
push ebp
lea edx, [esp + 0x1c]
mov ecx, edi
call fcn.0040f55e
add esp, 0xc
mov esi, eax
jmp 0x40f9bd
push 4
pop esi
lea ecx, [esp + 0x18]
call fcn.0040fbf4
mov eax, esi
jmp 0x40f9d5
push 6
jmp 0x40f9d4
push 2
jmp 0x40f9d4
push 0x11
pop eax
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051b034
add esp, 0x84
ret