Function at 0x40a2d0
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 edi, eax
cmp esi, 0xa
jae 0x40a2f2
mov eax, 0xffffffec
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
lea ecx, [edi + eax]
movzx eax, word [edx]
mov dword [esp + 0x3c], ecx
movzx ecx, word [edx + 2]
mov dword [esp + 0x20], ecx
movzx ecx, word [edx + 4]
mov ebx, dword [ebp + 0x10]
sub esi, ecx
add edx, 6
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x20]
sub esi, ecx
mov dword [esp + 0x40], edx
add edx, eax
mov dword [esp + 0x44], edx
add edx, ecx
mov ecx, dword [ebp + 8]
add ecx, 3
shr ecx, 2
mov dword [esp + 0x24], edx
lea edx, [ecx + edi]
mov dword [esp + 0x30], edx
add edx, ecx
add ecx, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [edx]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x30]
shr ecx, 0x10
sub esi, eax
mov dword [esp + 0x10], edi
movzx edi, cl
sub esi, 6
add ebx, 4
mov dword [esp + 0x2c], edi
cmp esi, dword [ebp + 0xc]
ja 0x40a2e6
mov edx, dword [esp + 0x40]
lea ecx, [esp + 0x78]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40a669
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x68]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40a669
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x58]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40a669
mov edx, dword [esp + 0x24]
add edx, dword [esp + 0x28]
mov eax, esi
lea ecx, [esp + 0x48]
call fcn.004093e0
cmp eax, 0xffffff88
ja 0x40a669
call fcn.004094f0
lea ecx, [esp + 0x58]
mov esi, eax
call fcn.004094f0
lea ecx, [esp + 0x68]
or esi, eax
call fcn.004094f0
lea ecx, [esp + 0x78]
or esi, eax
call fcn.004094f0
or esi, eax
jne 0x40a5bf
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff9
cmp dword [esp + 0x1c], eax
jae 0x40a5bf
mov edx, dword [esp + 0x7c]
mov ecx, edx
and ecx, 0x1f
mov eax, edi
mov edi, dword [esp + 0x78]
mov esi, edi
shl esi, cl
neg eax
and eax, 0x1f
mov ecx, eax
shr esi, cl
movzx ecx, byte [ebx + esi*2 + 1]
add edx, ecx
mov dword [esp + 0x7c], edx
movzx edx, byte [ebx + esi*2]
mov esi, dword [esp + 0x18]
mov byte [esi], dl
mov edx, dword [esp + 0x6c]
inc esi
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x68]
mov ecx, edx
and ecx, 0x1f
shl esi, cl
mov ecx, eax
shr esi, cl
movzx ecx, byte [ebx + esi*2 + 1]
add edx, ecx
mov dword [esp + 0x6c], edx
movzx edx, byte [ebx + esi*2]
mov esi, dword [esp + 0x10]
mov byte [esi], dl
mov edx, dword [esp + 0x5c]
inc esi
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x58]
mov ecx, edx
and ecx, 0x1f
shl esi, cl
mov ecx, eax
shr esi, cl
movzx ecx, byte [ebx + esi*2 + 1]
add edx, ecx
mov dword [esp + 0x5c], edx
movzx edx, byte [ebx + esi*2]
mov esi, dword [esp + 0x14]
mov byte [esi], dl
mov edx, dword [esp + 0x4c]
inc esi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x48]
mov ecx, edx
and ecx, 0x1f
shl esi, cl
mov ecx, eax
shr esi, cl
movzx ecx, byte [ebx + esi*2 + 1]
add edx, ecx
movzx ecx, byte [ebx + esi*2]
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x1c]
mov byte [edx], cl
mov ecx, esi
and ecx, 0x1f
shl edi, cl
mov ecx, eax
shr edi, cl
movzx ecx, byte [ebx + edi*2 + 1]
add esi, ecx
movzx ecx, byte [ebx + edi*2]
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x7c], esi
mov esi, dword [esp + 0x18]
mov byte [esi], cl
inc esi
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x68]
mov ecx, edi
and ecx, 0x1f
shl esi, cl
mov ecx, eax
shr esi, cl
add edx, 2
mov dword [esp + 0x1c], edx
movzx ecx, byte [ebx + esi*2 + 1]
add edi, ecx
movzx ecx, byte [ebx + esi*2]
mov esi, dword [esp + 0x10]
mov byte [esi], cl
inc esi
mov dword [esp + 0x6c], edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x58]
mov ecx, edi
and ecx, 0x1f
shl esi, cl
mov ecx, eax
shr esi, cl
movzx ecx, byte [ebx + esi*2 + 1]
add edi, ecx
movzx ecx, byte [ebx + esi*2]
mov esi, dword [esp + 0x14]
mov byte [esi], cl
mov dword [esp + 0x5c], edi
mov edi, dword [esp + 0x4c]
inc esi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x48]
mov ecx, edi
and ecx, 0x1f
shl esi, cl
mov ecx, eax
shr esi, cl
movzx eax, byte [ebx + esi*2 + 1]
movzx ecx, byte [ebx + esi*2]
mov byte [edx - 1], cl
add edi, eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x4c], edi
call fcn.004094f0
lea ecx, [esp + 0x58]
mov esi, eax
call fcn.004094f0
lea ecx, [esp + 0x68]
or esi, eax
call fcn.004094f0
lea ecx, [esp + 0x78]
or esi, eax
call fcn.004094f0
or esi, eax
mov edi, dword [esp + 0x2c]
je 0x40a411
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
cmp eax, ecx
ja 0x40a2e6
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x10], edx
ja 0x40a2e6
mov edx, dword [esp + 0x38]
cmp dword [esp + 0x14], edx
ja 0x40a2e6
push edi
push ecx
lea esi, [esp + 0x80]
call fcn.004072c0
mov eax, dword [esp + 0x3c]
push edi
push eax
mov eax, dword [esp + 0x20]
lea esi, [esp + 0x78]
call fcn.004072c0
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x24]
push edi
push ecx
lea esi, [esp + 0x70]
call fcn.004072c0
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x34]
push edi
push edx
lea esi, [esp + 0x68]
call fcn.004072c0
add esp, 0x20
mov eax, esi
call fcn.004066f0
mov edx, eax
lea eax, [esp + 0x58]
call fcn.004066f0
and edx, eax
lea eax, [esp + 0x68]
call fcn.004066f0
and edx, eax
lea eax, [esp + 0x78]
call fcn.004066f0
test eax, edx
mov eax, 0xffffffec
je 0x40a669
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret