Function at 0x40a910
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 0x40ac74
lea eax, [ecx + edx]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x10]
lea ebx, [eax + 2]
movzx eax, word [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 0x40ac74
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 0x40a9cf
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 0x40a9c6
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 0x40a9c6
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 0x40a9c6
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 0x40ab6e
mov eax, dword [esp + 0x38]
add eax, 0xfffffff9
mov dword [esp + 0x3c], eax
cmp edi, eax
jae 0x40ab6e
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x48]
push esi
mov edx, ebx
call fcn.0040a630
mov ecx, dword [esp + 0x1c]
add esp, 4
mov byte [ecx], al
inc ecx
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x58]
push esi
call fcn.0040a630
mov ecx, dword [esp + 0x14]
add esp, 4
mov byte [ecx], al
inc ecx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x68]
push esi
call fcn.0040a630
mov ecx, dword [esp + 0x18]
add esp, 4
mov byte [ecx], al
inc ecx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x78]
push esi
call fcn.0040a630
add esp, 4
mov byte [edi], al
lea ecx, [esp + 0x48]
push esi
call fcn.0040a630
mov ecx, dword [esp + 0x1c]
add esp, 4
mov byte [ecx], al
inc ecx
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x58]
push esi
call fcn.0040a630
mov ecx, dword [esp + 0x14]
add esp, 4
mov byte [ecx], al
inc ecx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x68]
push esi
call fcn.0040a630
mov ecx, dword [esp + 0x18]
add esp, 4
mov byte [ecx], al
inc ecx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x78]
push esi
call fcn.0040a630
add esp, 4
mov byte [edi + 1], al
lea ecx, [esp + 0x78]
add edi, 2
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 0x40aa78
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
cmp ecx, eax
ja 0x40ac74
mov edx, dword [esp + 0x30]
cmp dword [esp + 0x10], edx
ja 0x40ac74
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x14], edx
ja 0x40ac74
mov esi, dword [esp + 0x2c]
lea edx, [esp + 0x48]
push esi
push ebx
push eax
call fcn.0040a660
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x64]
add esp, 0xc
push esi
push ebx
push dword [esp + 0x38]
call fcn.0040a660
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x74]
add esp, 0xc
push esi
push ebx
push dword [esp + 0x3c]
call fcn.0040a660
add esp, 0xc
lea edx, [esp + 0x78]
mov ecx, edi
push esi
push ebx
push dword [esp + 0x40]
call fcn.0040a660
mov eax, dword [esp + 0x5c]
add esp, 0xc
cmp eax, dword [esp + 0x54]
jne 0x40ac05
cmp dword [esp + 0x4c], 0x20
jne 0x40ac05
mov ecx, 1
jmp 0x40ac07
xor ecx, ecx
mov eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x64]
jne 0x40ac1f
cmp dword [esp + 0x5c], 0x20
jne 0x40ac1f
mov edx, 1
jmp 0x40ac21
xor edx, edx
mov eax, dword [esp + 0x70]
cmp eax, dword [esp + 0x74]
jne 0x40ac39
cmp dword [esp + 0x6c], 0x20
jne 0x40ac39
mov esi, 1
jmp 0x40ac3b
xor esi, esi
mov eax, dword [esp + 0x80]
cmp eax, dword [esp + 0x84]
jne 0x40ac59
cmp dword [esp + 0x7c], 0x20
jne 0x40ac59
mov eax, 1
jmp 0x40ac5b
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