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

Disassembly:
sub esp, 0x20
push esi
mov esi, ecx
push edi
cmp byte [esi + 0xc], 1
jne 0x5aa117
mov eax, dword [esi + 0x10]
mov edi, dword [esi + 0x18]
cmp eax, 0xffffffff
je 0x5a9f0d
lea ecx, [esi + 0x14]
call fcn.0068f980
sub eax, dword [esi + 0x10]
cmp eax, edi
jge 0x5a9f15
sub edi, eax
test edi, edi
jne 0x5aa117
mov edi, dword [esi + 0x24]
lea ecx, [esp + 0xc]
call fcn.0068f980
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x40]
cmp eax, 4
mov dword [esi + 0x18], edi
jae 0x5aa128
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x28]
movsx edx, word [eax + 6]
cmp ecx, edx
jae 0x5a9f7e
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx*8 + 8]
test eax, eax
je 0x5a9f7e
movsx edx, word [eax + 6]
movsx ecx, word [eax + 4]
push edx
push ecx
movsx edx, word [eax + 2]
movsx eax, word [eax]
push edx
push eax
lea ecx, [esp + 0x18]
call fcn.0042bcd0
mov edi, eax
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
mov edi, dword [edi + 0xc]
jmp 0x5a9f95
mov eax, dword [0xa59400]
mov ecx, dword [0xa59404]
mov edx, dword [0xa59408]
mov edi, dword [0xa5940c]
push ebx
push ebp
mov ebp, dword [esp + 0x38]
mov ebx, ebp
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], edi
mov ecx, dword [esi + 4]
mov edx, dword [ebp]
add edx, ecx
mov ecx, dword [ebp + 4]
mov dword [ebp], edx
mov edx, dword [esi + 8]
add ecx, edx
mov dword [ebp + 4], ecx
mov eax, dword [esi + 0x38]
test ah, 2
je 0x5a9ff2
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebp]
movsx eax, word [eax + 2]
cdq
sub eax, edx
sar eax, 1
neg eax
add ecx, eax
mov dword [ebp], ecx
mov ecx, dword [esi + 0x1c]
movsx eax, word [ecx + 4]
mov ecx, dword [ebp + 4]
cdq
sub eax, edx
sar eax, 1
neg eax
add ecx, eax
mov dword [ebp + 4], ecx
mov edi, dword [esp + 0x34]
mov eax, dword [0x821c78]
push 1
push 0
mov edx, dword [edi]
push ebp
push eax
push ebp
mov ecx, edi
call dword [edx + 8]
mov eax, dword [esi + 0x40]
cmp eax, 3
mov edx, eax
jb 0x5aa018
mov edx, 3
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov ebx, dword [esi + 4]
push ecx
push ecx
push 0x3e8
push ecx
push ecx
push ecx
mov ecx, dword [edx*4 + 0x7d0258]
mov edx, dword [esi + 0x38]
mov dword [esp + 0x30], ebx
mov ebx, dword [esi + 8]
or ecx, edx
mov edx, dword [edi]
lea eax, [esp + 0x40]
push ecx
push eax
mov ecx, edi
mov dword [esp + 0x3c], ebx
call dword [edx + 0x78]
mov edx, dword [esi + 0x28]
lea ecx, [esp + 0x34]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
mov edx, dword [esi + 0x20]
push eax
mov ecx, edi
call fcn.0049ea80
mov ecx, dword [esi + 0x44]
test ecx, ecx
je 0x5aa0a8
mov dword [esp + 0x38], esi
mov edx, dword [ecx]
lea eax, [esp + 0x38]
push eax
call dword [edx + 0x10]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x44]
xor ebx, ebx
mov ecx, dword [eax + 0x10]
test ecx, ecx
jle 0x5aa0a8
cmp ebx, dword [esp + 0x38]
je 0x5aa09f
mov ecx, dword [eax + 4]
push ebp
push edi
mov ecx, dword [ecx + ebx*4]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov eax, dword [esi + 0x44]
inc ebx
cmp ebx, dword [eax + 0x10]
jl 0x5aa08c
mov ecx, dword [esi + 0x40]
pop ebp
inc ecx
pop ebx
mov eax, ecx
mov dword [esi + 0x40], ecx
cmp eax, 4
jb 0x5aa105
mov edx, dword [esi + 4]
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [esi + 0x38]
push ecx
push ecx
push 0x3e8
push ecx
mov dword [esp + 0x20], edx
mov edx, dword [esi + 8]
push ecx
or ah, 4
push ecx
push eax
mov dword [esp + 0x30], edx
mov edx, dword [edi]
lea eax, [esp + 0x3c]
mov ecx, edi
push eax
call dword [edx + 0x78]
mov edx, dword [esi + 0x28]
lea ecx, [esp + 0x2c]
push eax
mov eax, dword [esi + 0x1c]
push ecx
mov ecx, dword [0x821c78]
push edx
mov edx, dword [esi + 0x20]
push eax
call fcn.0049ea80
mov cl, byte [esi + 0x48]
xor eax, eax
test cl, cl
pop edi
pop esi
sete al
add esp, 0x20
ret 8
mov eax, dword [esp + 0x30]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
pop edi
xor al, al
pop esi
add esp, 0x20
ret 8