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

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x50]
push ebp
mov ebp, dword [esp + 0x50]
mov edx, dword [ebp + 0xf0]
mov eax, dword [ebp]
imul edx, edx, 0x3c
push esi
push edi
add edx, dword [eax + 0x18c]
cmp edx, ebx
mov cl, 1
jne 0x5aff9d
mov byte [ebp + 0x1db], cl
mov esi, dword [esp + 0x64]
mov byte [ebp + 0x1dc], cl
cmp byte [esi], 0
jns 0x5affb8
mov edi, dword [eax + 0x114]
mov dword [esp + 0x58], edi
jmp 0x5affc4
mov dword [esp + 0x58], 0
mov edi, dword [esp + 0x58]
lea eax, [edi + 2]
mov dword [esp + 0x14], eax
mov al, byte [esp + 0x6c]
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x1c]
push edx
test al, al
mov eax, dword [esp + 0x70]
push eax
push esi
je 0x5affed
call fcn.005af130
add esp, 0x10
jmp 0x5afff7
push ebx
push edi
call fcn.005af070
add esp, 0x18
test eax, eax
jne 0x5b0006
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x44
ret
movzx bx, byte [esi]
movzx cx, byte [esi + 1]
shl ebx, 8
add ebx, ecx
and ebx, 0x7fff
mov ecx, edi
neg ecx
sbb ecx, ecx
and ecx, 0x8000
mov dword [esp + 0x18], ecx
sub ecx, esi
add ecx, eax
movzx eax, cx
mov byte [esi + 1], al
shr eax, 8
test edi, edi
mov byte [esi], al
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x10], eax
je 0x5b0067
mov ecx, edi
mov edx, ecx
mov esi, eax
sub esi, edi
mov edi, dword [ebp + 0x64]
add edi, 2
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
push 3
push eax
push ebp
call fcn.005cdc20
mov ecx, eax
and ecx, edx
add esp, 0xc
cmp ecx, 0xffffffff
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
je 0x5afffb
mov ecx, dword [esp + 0x5c]
push edx
mov edx, dword [esp + 0x6c]
push eax
mov eax, dword [esp + 0x68]
push edx
push eax
push ecx
call fcn.005caf00
add esp, 0xc
push eax
push ebp
call fcn.005ca080
mov edx, dword [esp + 0x78]
push edx
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x74]
push edi
push eax
call dword [eax + 0x28]
add esp, 0x20
test eax, eax
je 0x5afffb
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x24]
push ecx
push edx
push 0
push 0
push 0
push edi
push eax
call dword [eax + 0x2c]
mov edx, dword [esp + 0x2c]
mov edi, dword [ebp + 0x64]
sub ebx, edx
add ebx, esi
mov esi, edx
add edi, eax
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x30]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
add edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 0x64]
mov esi, dword [esp + 0x78]
lea ecx, [esp + 0x40]
push ecx
add edx, eax
push edx
push esi
call dword [esi + 0x30]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x94]
mov edx, dword [ebp + 0x64]
add eax, ecx
add eax, edi
add eax, ebx
movzx eax, ax
mov byte [edx + 1], al
mov ecx, dword [ebp + 0x64]
shr eax, 8
mov byte [ecx], al
mov edx, dword [ebp + 0x64]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push edx
push 3
push eax
push ecx
push esi
push ebp
call fcn.005cda40
add esp, 0x40
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xfffffffd
pop ebp
add eax, 2
pop ebx
add esp, 0x44
ret