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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov eax, dword [esp + 0x34]
mov esi, 0xfffffffa
test eax, eax
je 0x5a9386
cmp dword [esp + 0x38], 0x38
jne 0x5a9386
cmp byte [eax], 0x31
jne 0x5a9386
mov ebp, dword [esp + 0x1c]
mov esi, 0xfffffffe
test ebp, ebp
je 0x5a9386
mov dword [ebp + 0x18], 0
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x5a90ce
mov dword [ebp + 0x20], 0x5ae340
mov eax, 0x5ae340
mov dword [ebp + 0x28], 0
mov edx, dword [esp + 0x20]
cmp dword [ebp + 0x24], 0
jne 0x5a90df
mov dword [ebp + 0x24], 0x5ae360
mov ecx, dword [esp + 0x28]
mov edi, 6
cmp edx, 0xffffffff
je 0x5a90ef
mov edi, edx
test ecx, ecx
js 0x5a9104
cmp ecx, 0x10
jl 0x5a9111
add ecx, 0xfffffff0
mov dword [esp], 2
jmp 0x5a910d
neg ecx
mov dword [esp], 0
mov dl, 1
jmp 0x5a911a
mov dword [esp], 1
xor edx, edx
cmp ecx, 8
sete bl
test bl, dl
jne 0x5a9386
cmp dword [esp + 0x30], 4
ja 0x5a9386
cmp edi, 9
ja 0x5a9386
cmp dword [esp + 0x24], 8
jne 0x5a9386
mov edx, dword [esp + 0x2c]
add edx, 0xffffffff
cmp edx, 8
ja 0x5a9386
mov edx, ecx
and edx, 0xfffffff8
cmp edx, 8
jne 0x5a9386
mov dword [esp + 4], edi
mov ebx, 9
cmp ecx, 8
je 0x5a9175
mov ebx, ecx
push 0x16c4
push 1
push dword [ebp + 0x28]
call eax
add esp, 0xc
mov esi, 0xfffffffc
test eax, eax
je 0x5a9386
mov edi, eax
mov dword [ebp + 0x1c], eax
mov dword [eax], ebp
mov dword [eax + 4], 0x2a
mov eax, dword [esp]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], 0
mov dword [edi + 0x30], ebx
mov eax, 1
mov ecx, ebx
shl eax, cl
mov dword [edi + 0x2c], eax
lea ecx, [eax - 1]
mov dword [edi + 0x34], ecx
mov ebx, dword [esp + 0x2c]
lea ecx, [ebx + 7]
mov dword [edi + 0x50], ecx
mov edx, 1
shl edx, cl
mov dword [edi + 0x4c], edx
add edx, 0xffffffff
mov dword [edi + 0x54], edx
mov ecx, ebx
add cl, 9
movzx ecx, cl
imul ecx, ecx, 0xab
shr ecx, 9
mov dword [edi + 0x58], ecx
push 2
push eax
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 0x38], eax
push 2
push dword [edi + 0x2c]
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 0x40], eax
push 2
push dword [edi + 0x4c]
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 0x44], eax
mov dword [edi + 0x16c0], 0
add bl, 6
mov ecx, ebx
mov eax, 1
shl eax, cl
mov dword [edi + 0x169c], eax
push 4
push eax
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 8], eax
mov ecx, dword [edi + 0x169c]
lea edx, [ecx*4]
mov dword [edi + 0xc], edx
cmp dword [edi + 0x38], 0
je 0x5a936e
cmp dword [edi + 0x40], 0
je 0x5a936e
test eax, eax
je 0x5a936e
cmp dword [edi + 0x44], 0
je 0x5a936e
mov edx, ecx
and edx, 0xfffffffe
add edx, eax
mov dword [edi + 0x16a4], edx
lea ecx, [ecx + ecx*2]
add ecx, eax
mov dword [edi + 0x1698], ecx
mov eax, dword [esp + 4]
mov dword [edi + 0x84], eax
mov eax, dword [esp + 0x30]
mov dword [edi + 0x88], eax
mov byte [edi + 0x24], 8
push ebp
call fcn.005a9840
add esp, 4
mov esi, eax
test eax, eax
jne 0x5a9386
mov esi, dword [ebp + 0x1c]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x44]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x4c]
mov word [ecx + eax*2 - 2], 0
mov eax, dword [esi + 0x4c]
lea eax, [eax + eax - 2]
push eax
push 0
push dword [esi + 0x44]
call fcn.005c5400
add esp, 0xc
mov eax, dword [esi + 0x84]
shl eax, 2
movzx ecx, word [eax + eax*2 + 0x604c3e]
mov dword [esi + 0x80], ecx
movzx ecx, word [eax + eax*2 + 0x604c3c]
mov dword [esi + 0x8c], ecx
movzx ecx, word [eax + eax*2 + 0x604c40]
mov dword [esi + 0x90], ecx
movzx eax, word [eax + eax*2 + 0x604c42]
mov dword [esi + 0x7c], eax
mov dword [esi + 0x6c], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x16b4], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
xor esi, esi
jmp 0x5a9386
mov dword [edi + 4], 0x29a
mov eax, dword [str.insufficient_memory]
mov dword [ebp + 0x18], eax
push ebp
call fcn.005a9390
add esp, 4
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret