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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x40], edx
mov dword [esp + 0x14], ecx
push edi
cmp esi, 0xa
jb 0x40b95e
lea eax, [ecx + edx]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x10]
lea ebx, [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
movzx edi, word [eax]
mov dword [esp + 0x28], edi
movzx edi, word [eax + 2]
mov dword [esp + 0x1c], edi
movzx edi, word [eax + 4]
mov dword [esp + 0x20], edi
lea edi, [eax + 6]
sub esi, dword [esp + 0x20]
lea eax, [edx + 3]
sub esi, dword [esp + 0x1c]
shr eax, 2
add ecx, eax
mov dword [esp + 0x3c], edi
add edi, dword [esp + 0x28]
mov dword [esp + 0x24], edi
mov dword [esp + 0x40], ecx
lea edx, [ecx + eax]
mov dword [esp + 0x10], ecx
add eax, edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov edi, eax
mov eax, dword [esp + 0x28]
sub esi, eax
sub esi, 6
mov dword [esp + 0x14], edx
cmp esi, dword [ebp + 0xc]
ja 0x40b95e
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x48]
push eax
call fcn.00409450
add esp, 4
mov ecx, eax
call fcn.00403750
test eax, eax
je 0x40b6ce
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x5c]
call fcn.00409450
add esp, 4
mov ecx, eax
call fcn.00403750
test eax, eax
jne 0x40b6c5
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
push dword [esp + 0x20]
lea edx, [edx + ecx]
lea ecx, [esp + 0x6c]
call fcn.00409450
add esp, 4
mov ecx, eax
call fcn.00403750
test eax, eax
jne 0x40b6c5
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x78]
mov eax, dword [esp + 0x20]
add edx, dword [esp + 0x24]
push esi
lea edx, [edx + eax]
call fcn.00409450
add esp, 4
mov ecx, eax
call fcn.00403750
test eax, eax
jne 0x40b6c5
lea ecx, [esp + 0x78]
call fcn.00409550
lea ecx, [esp + 0x68]
mov esi, eax
call fcn.00409550
lea ecx, [esp + 0x58]
or esi, eax
call fcn.00409550
lea ecx, [esp + 0x48]
or esi, eax
call fcn.00409550
or esi, eax
jne 0x40b858
mov eax, dword [esp + 0x38]
add eax, 0xfffffff9
mov dword [esp + 0x3c], eax
cmp edi, eax
jae 0x40b858
mov esi, dword [esp + 0x2c]
lea edx, [esp + 0x48]
mov ecx, dword [esp + 0x18]
push esi
push ebx
call fcn.0040b320
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x60]
add dword [esp + 0x20], eax
push esi
push ebx
call fcn.0040b320
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x78]
add dword [esp + 0x20], eax
push esi
push ebx
call fcn.0040b320
add dword [esp + 0x2c], eax
lea edx, [esp + 0x90]
push esi
push ebx
mov ecx, edi
call fcn.0040b320
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x68]
push esi
push ebx
add edi, eax
call fcn.0040b320
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x80]
add dword [esp + 0x40], eax
push esi
push ebx
call fcn.0040b320
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x98]
add dword [esp + 0x40], eax
push esi
push ebx
call fcn.0040b320
add dword [esp + 0x4c], eax
lea edx, [esp + 0xb0]
push esi
push ebx
mov ecx, edi
call fcn.0040b320
add esp, 0x40
lea ecx, [esp + 0x78]
add edi, eax
call fcn.00409550
lea ecx, [esp + 0x68]
mov esi, eax
call fcn.00409550
lea ecx, [esp + 0x58]
or esi, eax
call fcn.00409550
lea ecx, [esp + 0x48]
or esi, eax
call fcn.00409550
or esi, eax
mov eax, dword [esp + 0x3c]
je 0x40b777
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
cmp ecx, eax
ja 0x40b95e
mov edx, dword [esp + 0x30]
cmp dword [esp + 0x10], edx
ja 0x40b95e
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x14], edx
ja 0x40b95e
mov esi, dword [esp + 0x2c]
lea edx, [esp + 0x48]
push esi
push ebx
push eax
call fcn.0040b3d0
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x64]
add esp, 0xc
push esi
push ebx
push dword [esp + 0x38]
call fcn.0040b3d0
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x74]
add esp, 0xc
push esi
push ebx
push dword [esp + 0x3c]
call fcn.0040b3d0
add esp, 0xc
lea edx, [esp + 0x78]
mov ecx, edi
push esi
push ebx
push dword [esp + 0x40]
call fcn.0040b3d0
mov eax, dword [esp + 0x5c]
add esp, 0xc
cmp eax, dword [esp + 0x54]
jne 0x40b8ef
cmp dword [esp + 0x4c], 0x20
jne 0x40b8ef
mov ecx, 1
jmp 0x40b8f1
xor ecx, ecx
mov eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x64]
jne 0x40b909
cmp dword [esp + 0x5c], 0x20
jne 0x40b909
mov edx, 1
jmp 0x40b90b
xor edx, edx
mov eax, dword [esp + 0x70]
cmp eax, dword [esp + 0x74]
jne 0x40b923
cmp dword [esp + 0x6c], 0x20
jne 0x40b923
mov esi, 1
jmp 0x40b925
xor esi, esi
mov eax, dword [esp + 0x80]
cmp eax, dword [esp + 0x84]
jne 0x40b943
cmp dword [esp + 0x7c], 0x20
jne 0x40b943
mov eax, 1
jmp 0x40b945
xor eax, eax
and eax, esi
and eax, edx
test ecx, eax
mov eax, dword [esp + 0x44]
mov ecx, 0xffffffec
cmove eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffec
pop ebx
mov esp, ebp
pop ebp
ret