Function at 0x40aa60
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]
push edi
mov ebx, eax
cmp esi, 0xa
jae 0x40aa82
mov eax, 0xffffffec
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
lea edx, [ebx + eax]
movzx eax, word [ecx]
mov dword [esp + 0x3c], edx
movzx edx, word [ecx + 2]
add ecx, 6
mov dword [esp + 0x24], edx
movzx edx, word [ecx - 2]
sub esi, edx
mov dword [esp + 0x40], ecx
add ecx, eax
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x44], ecx
add ecx, edx
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp + 8]
add ecx, 3
sub esi, edx
shr ecx, 2
lea edx, [ecx + ebx]
mov dword [esp + 0x30], edx
add edx, ecx
add ecx, edx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x14], ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], edx
mov edx, dword [ecx]
shr edx, 0x10
sub esi, eax
movzx ecx, dl
sub esi, 6
add edi, 4
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ecx
cmp esi, dword [ebp + 0xc]
ja 0x40aa76
mov edx, dword [esp + 0x40]
lea ecx, [esp + 0x78]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40ae18
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x58]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40ae18
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x48]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40ae18
mov edx, dword [esp + 0x28]
add edx, dword [esp + 0x2c]
mov eax, esi
lea ecx, [esp + 0x68]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40ae18
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 0x40ad5b
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff9
cmp ebx, eax
jae 0x40ad5b
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 + 0x20]
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 + 0x20], 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 0x40aba3
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x10], eax
ja 0x40aa76
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x14], ecx
ja 0x40aa76
mov edx, dword [esp + 0x38]
cmp dword [esp + 0x18], edx
ja 0x40aa76
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 + 0x3c]
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 + 0x48]
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 + 0x54]
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 0x40ae18
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret