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

Disassembly:
sub esp, 0x24
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x10], 0
push esi
push edi
xor ebx, ebx
mov eax, dword [ebp + 0x98]
mov edi, dword [ebp + 0x58]
and al, 0xc
mov ecx, dword [ebp]
add edi, 0x28
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], edi
cmp al, 4
je 0x5a88b4
mov eax, dword [ecx + 0x20]
and eax, 0x1000000
or eax, ebx
jne 0x5a88b4
xor esi, esi
jmp 0x5a88b9
mov esi, 1
mov edx, 8
mov dword [esp + 0x20], esi
mov ecx, edi
call fcn.005a87a0
cmp dword [ebp + 0x28], 7
mov dword [ebp + 0x78], ebx
jne 0x5a88e8
mov ecx, dword [esp + 0x28]
call fcn.005890c0
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [ebp + 0x6c]
mov dword [esp + 0x10], ecx
test esi, esi
je 0x5a8980
mov eax, dword [ebp + 0x58]
add eax, 0x168
mov dword [esp + 0x1c], eax
test byte [eax + 8], 0x10
je 0x5a8918
mov edx, dword [eax + 0xc]
mov ebx, dword [eax + 0x10]
shr edx, 2
mov dword [esp + 0x18], edx
jmp 0x5a891a
xor edx, edx
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x14], esi
cmp edx, 2
jb 0x5a8952
lea eax, [edx - 1]
xor edx, edx
mov dword [esp + 0x14], eax
mov edi, eax
mov eax, dword [ebx + ecx*4]
add esi, dword [eax + 4]
mov eax, dword [ebx + ecx*4 + 4]
add ecx, 2
add edx, dword [eax + 4]
cmp ecx, edi
jl 0x5a8932
mov edi, dword [esp + 0x24]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
cmp ecx, edx
jge 0x5a896e
mov eax, dword [ebx + ecx*4]
mov ecx, dword [esp + 0x10]
add ecx, dword [eax + 4]
mov eax, dword [esp + 0x14]
add eax, esi
add ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x5a8982
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add eax, esi
add ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x5a8982
xor edx, edx
mov esi, dword [ebp + 0x24]
lea eax, [esi + 1]
mov dword [ebp + 0x24], eax
cmp esi, ecx
jge 0x5a8aa9
mov eax, dword [ebp + 0x6c]
cmp esi, eax
jge 0x5a899f
mov eax, dword [ebp + 0x68]
jmp 0x5a89c2
sub esi, eax
xor ecx, ecx
mov eax, dword [ebx]
mov eax, dword [eax + 4]
cmp esi, eax
jl 0x5a89bd
nop dword [eax]
inc ecx
sub esi, eax
mov eax, dword [ebx + ecx*4]
mov eax, dword [eax + 4]
cmp esi, eax
jge 0x5a89b0
mov eax, dword [ebx + ecx*4]
mov eax, dword [eax]
cmp dword [esp + 0x20], 0
lea ecx, [esi + esi*4]
lea ecx, [eax + ecx*4]
mov dword [esp + 0x14], ecx
je 0x5a8a7a
cmp byte [ecx + 1], 0xfc
jne 0x5a8a7a
lea eax, [edx*4]
mov dword [esp + 0x30], eax
add eax, 4
mov dword [esp + 0x2c], eax
xor eax, eax
test edx, edx
jle 0x5a8a0e
mov ecx, dword [ecx + 0x10]
nop dword [eax]
cmp dword [ebx + eax*4], ecx
je 0x5a8a0a
inc eax
cmp eax, edx
jl 0x5a8a00
mov ecx, dword [esp + 0x14]
cmp eax, edx
jne 0x5a8a7a
mov ebx, dword [esp + 0x1c]
xor eax, eax
test edx, edx
mov ecx, ebx
mov edx, dword [esp + 0x2c]
setne al
push eax
call fcn.005a5b60
add esp, 4
mov dword [ebp + 0x28], eax
test eax, eax
jne 0x5a8abf
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
mov ebx, dword [ebx + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [ecx + 0x10]
mov dword [edx + ebx], eax
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x18], edx
or word [eax + 8], 0x10
lea eax, [edx*4]
mov dword [edi + 0xc], eax
mov eax, dword [ecx + 0x10]
mov edi, dword [esp + 0x10]
add edi, dword [eax + 4]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x24]
mov eax, dword [ebp + 0x98]
and al, 0xc
cmp al, 8
jb 0x5a8ace
mov al, byte [ecx]
cmp al, 0xae
je 0x5a8ace
cmp al, 0x3e
jne 0x5a8a96
cmp dword [ebp + 0x24], 1
jg 0x5a8ace
mov esi, dword [ebp + 0x24]
lea eax, [esi + 1]
mov dword [ebp + 0x24], eax
cmp esi, dword [esp + 0x10]
jl 0x5a8993
mov esi, 0x65
mov dword [ebp + 0x28], 0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov esi, 1
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x110], 0
je 0x5a8b0a
mov eax, dword [0x7c1a7c]
mov ecx, 0x7e73d4
test eax, eax
mov dword [ebp + 0x28], 9
mov esi, 1
cmovne ecx, eax
push ecx
push ebp
call fcn.005a7300
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [ebp + 0x98]
mov eax, 4
and cl, 0xc
mov ebx, 0xa02
cmp cl, al
jne 0x5a8b78
mov word [edi + 8], ax
mov eax, esi
mov esi, dword [esp + 0x14]
cdq
mov dword [edi], eax
mov dword [edi + 4], edx
mov word [edi + 0x30], bx
movzx eax, byte [esi]
mov ecx, dword [eax*4 + 0x7c7638]
mov dword [edi + 0x38], ecx
test ecx, ecx
jne 0x5a8b55
mov dword [edi + 0x34], ecx
lea eax, [ecx + 4]
mov byte [edi + 0x32], 1
add edi, 0x50
jmp 0x5a8b7c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5a8b58
sub ecx, edx
mov byte [edi + 0x32], 1
and ecx, 0x3fffffff
mov eax, 4
mov dword [edi + 0x34], ecx
add edi, 0x50
jmp 0x5a8b7c
mov esi, dword [esp + 0x14]
mov word [edi + 8], ax
mov ecx, 4
mov eax, dword [esi + 4]
cdq
mov dword [edi], eax
mov dword [edi + 4], edx
lea ebx, [ecx - 3]
mov word [edi + 0x30], cx
mov eax, dword [esi + 8]
cdq
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], edx
mov word [edi + 0x58], cx
mov eax, dword [esi + 0xc]
cdq
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], edx
add edi, 0x78
cmp dword [edi + 0x18], 0x64
jge 0x5a8bcf
lea edx, [ecx + 0x60]
mov ecx, edi
push 0
call fcn.005a5b60
add esp, 4
test eax, eax
jne 0x5a8cb5
jmp 0x5a8bd5
mov eax, dword [edi + 0x14]
mov dword [edi + 0x10], eax
push dword [edi + 0x18]
mov edx, dword [edi + 0x10]
mov eax, 0x202
mov ecx, esi
mov word [edi + 8], ax
call fcn.005a82e0
mov ecx, dword [edi + 0x10]
mov ebx, eax
add esp, 4
cmp ebx, ecx
je 0x5a8c69
mov dword [edi + 0xc], 0
test ebx, ebx
jne 0x5a8c21
mov eax, 0x2400
test word [edi + 8], ax
je 0x5a8c16
mov ecx, edi
call fcn.005a5f80
jmp 0x5a8c86
mov ebx, 1
mov word [edi + 8], bx
jmp 0x5a8c8b
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x5a8c26
sub esi, ecx
mov eax, 0x2400
and esi, 0x7fffffff
test word [edi + 8], ax
jne 0x5a8c46
cmp dword [edi + 0x18], 0
je 0x5a8c4d
mov ecx, edi
call fcn.005a5fc0
mov eax, 0xa02
mov dword [edi + 0xc], esi
mov esi, dword [esp + 0x14]
mov dword [edi + 0x10], ebx
mov dword [edi + 0x24], 0
mov word [edi + 8], ax
jmp 0x5a8c82
test ecx, ecx
je 0x5a8c7f
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5a8c70
sub ecx, edx
and ecx, 0x3fffffff
mov dword [edi + 0xc], ecx
mov byte [edi + 0xa], 1
mov ebx, 1
mov ecx, dword [ebp + 0x98]
mov eax, ecx
and al, 0xc
cmp al, 4
jne 0x5a8cfa
cmp dword [edi + 0x40], 4
jge 0x5a8cbf
push 0
mov edx, 4
lea ecx, [edi + 0x28]
call fcn.005a5b60
add esp, 4
test eax, eax
je 0x5a8cc5
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [edi + 0x3c]
mov dword [edi + 0x38], eax
mov eax, 0x202
mov dword [edi + 0x34], 2
mov word [edi + 0x30], ax
movzx eax, word [esi + 2]
push eax
push 0x7e2eb0
push dword [edi + 0x38]
push 3
call fcn.0058b290
mov byte [edi + 0x32], 1
add esp, 0x10
mov word [edi + 0x58], bx
mov ecx, dword [ebp + 0x98]
shr ecx, 2
mov eax, 3
and ecx, 3
mov dword [ebp + 0x28], 0
sub eax, ecx
mov esi, 0x64
shl eax, 2
mov word [ebp + 0x90], ax
mov eax, dword [ebp + 0x58]
add eax, 0x28
pop edi
mov dword [ebp + 0x78], eax
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret