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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
cmp dword [ebp + 0xc], 0xa
push ebx
push esi
push edi
mov esi, edx
jae 0x407da0
mov eax, 0xffffffec
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ebx, word [ecx + 4]
mov edx, dword [ebp + 8]
add edx, esi
add ecx, 6
lea edi, [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], edx
movzx edx, word [ecx - 4]
mov dword [esp + 0x1c], eax
movzx eax, word [ecx - 6]
add ecx, eax
mov dword [esp + 0x44], ecx
add ecx, edx
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp + 8]
add ecx, 3
shr ecx, 2
mov dword [esp + 0x20], ebx
lea ebx, [ecx + esi]
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], ebx
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x14], esi
mov esi, dword [ebp + 0xc]
sub esi, dword [esp + 0x20]
add ebx, ecx
sub esi, edx
add ecx, ebx
sub esi, eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], ebx
sub esi, 6
mov ebx, ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x24], ebx
cmp esi, dword [ebp + 0xc]
ja 0x407d94
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x78]
call fcn.004065f0
cmp eax, 0xffffff88
ja 0x40812b
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x58]
call fcn.004065f0
cmp eax, 0xffffff88
ja 0x40812b
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x48]
call fcn.004065f0
cmp eax, 0xffffff88
ja 0x40812b
mov edx, dword [esp + 0x20]
add edx, dword [esp + 0x28]
mov eax, esi
lea ecx, [esp + 0x68]
call fcn.004065f0
cmp eax, 0xffffff88
ja 0x40812b
call fcn.004094f0
lea ecx, [esp + 0x48]
mov esi, eax
call fcn.004094f0
lea ecx, [esp + 0x58]
or esi, eax
call fcn.004094f0
lea ecx, [esp + 0x78]
or esi, eax
call fcn.004094f0
or esi, eax
jne 0x40806e
mov eax, dword [esp + 0x38]
add eax, 0xfffffff9
cmp ebx, eax
jae 0x40806e
mov ecx, dword [esp + 0x7c]
mov esi, dword [esp + 0x78]
mov eax, dword [esp + 0x1c]
and ecx, 0x1f
mov ebx, dword [esp + 0x10]
mov edx, esi
shl edx, cl
neg eax
and eax, 0x1f
mov ecx, eax
shr edx, cl
movzx ecx, word [edi + edx*4]
mov word [ebx], cx
movzx ecx, byte [edi + edx*4 + 2]
add dword [esp + 0x7c], ecx
movzx edx, byte [edi + edx*4 + 3]
add dword [esp + 0x10], edx
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
and ecx, 0x1f
shl edx, cl
mov ebx, dword [esp + 0x14]
mov ecx, eax
shr edx, cl
movzx ecx, word [edi + edx*4]
mov word [ebx], cx
movzx ecx, byte [edi + edx*4 + 2]
add dword [esp + 0x5c], ecx
movzx edx, byte [edi + edx*4 + 3]
add dword [esp + 0x14], edx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x18]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx ecx, word [edi + edx*4]
mov word [ebx], cx
movzx ecx, byte [edi + edx*4 + 2]
add dword [esp + 0x4c], ecx
movzx edx, byte [edi + edx*4 + 3]
add dword [esp + 0x18], edx
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
mov ebx, dword [esp + 0x24]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx ecx, word [edi + edx*4]
mov word [ebx], cx
movzx ecx, byte [edi + edx*4 + 2]
add dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x7c]
movzx edx, byte [edi + edx*4 + 3]
and ecx, 0x1f
shl esi, cl
mov ecx, eax
add ebx, edx
mov edx, dword [esp + 0x10]
shr esi, cl
movzx ecx, word [edi + esi*4]
mov word [edx], cx
movzx ecx, byte [edi + esi*4 + 2]
add dword [esp + 0x7c], ecx
movzx edx, byte [edi + esi*4 + 3]
add dword [esp + 0x10], edx
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
mov esi, dword [esp + 0x14]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx ecx, word [edi + edx*4]
mov word [esi], cx
movzx ecx, byte [edi + edx*4 + 2]
movzx edx, byte [edi + edx*4 + 3]
add dword [esp + 0x5c], ecx
add dword [esp + 0x14], edx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x18]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx ecx, word [edi + edx*4]
mov word [esi], cx
movzx ecx, byte [edi + edx*4 + 2]
movzx edx, byte [edi + edx*4 + 3]
add dword [esp + 0x4c], ecx
mov esi, dword [esp + 0x6c]
add dword [esp + 0x18], edx
mov edx, dword [esp + 0x68]
mov ecx, esi
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
mov ax, word [edi + edx*4]
mov word [ebx], ax
movzx ecx, byte [edi + edx*4 + 2]
movzx edx, byte [edi + edx*4 + 3]
add esi, ecx
add ebx, edx
lea ecx, [esp + 0x68]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x24], ebx
call fcn.004094f0
lea ecx, [esp + 0x48]
mov esi, eax
call fcn.004094f0
lea ecx, [esp + 0x58]
or esi, eax
call fcn.004094f0
lea ecx, [esp + 0x78]
or esi, eax
call fcn.004094f0
or esi, eax
je 0x407eb6
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x10], eax
ja 0x407d94
mov ecx, dword [esp + 0x30]
cmp dword [esp + 0x14], ecx
ja 0x407d94
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x18], edx
ja 0x407d94
mov ecx, dword [esp + 0x1c]
push ecx
push eax
mov eax, dword [esp + 0x18]
lea esi, [esp + 0x80]
call fcn.00407ba0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x24]
lea esi, [esp + 0x68]
call fcn.00407ba0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x28]
push ecx
push edx
lea esi, [esp + 0x60]
call fcn.00407ba0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x50]
push eax
push ecx
lea esi, [esp + 0x88]
mov eax, ebx
call fcn.00407ba0
add esp, 0x20
mov eax, esi
call fcn.004066f0
mov edx, eax
lea eax, [esp + 0x48]
call fcn.004066f0
and edx, eax
lea eax, [esp + 0x58]
call fcn.004066f0
and edx, eax
lea eax, [esp + 0x78]
call fcn.004066f0
test eax, edx
mov eax, 0xffffffec
je 0x40812b
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret