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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov esi, dword [esp + 0x30]
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x48]
test eax, eax
je 0x58f5b8
cmp byte [eax], 0x31
jne 0x58f5b8
cmp dword [esp + 0x4c], 0x38
jne 0x58f5b8
test esi, esi
je 0x58f58c
mov dword [esi + 0x18], 0
mov eax, dword [esi + 0x20]
test eax, eax
je 0x58f5d4
mov eax, dword [esi + 0x24]
test eax, eax
je 0x58f5f0
cmp dword [esp + 0x34], 0xffffffff
je 0x58f59c
test ebp, ebp
js 0x58f5ac
cmp ebp, 0xf
jg 0x58f544
mov edi, 1
mov eax, dword [esp + 0x40]
dec eax
cmp eax, 8
ja 0x58f58c
cmp dword [esp + 0x38], 8
jne 0x58f58c
cmp ebp, 7
jle 0x58f58c
cmp ebp, 0xf
jg 0x58f58c
mov eax, dword [esp + 0x34]
test eax, eax
js 0x58f58c
cmp dword [esp + 0x34], 9
jg 0x58f58c
mov eax, dword [esp + 0x44]
test eax, eax
js 0x58f58c
cmp dword [esp + 0x44], 4
jg 0x58f58c
cmp ebp, 8
je 0x58f5c8
mov dword [esp + 8], 0x16c4
mov dword [esp + 4], 1
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov ebx, eax
test eax, eax
je 0x58f61d
mov dword [esi + 0x1c], eax
mov dword [eax], esi
mov dword [eax + 0x18], edi
mov dword [eax + 0x1c], 0
mov dword [eax + 0x30], ebp
mov edi, 1
mov eax, edi
mov ecx, ebp
shl eax, cl
mov ebp, eax
mov dword [ebx + 0x2c], eax
lea eax, [eax - 1]
mov dword [ebx + 0x34], eax
mov ecx, dword [esp + 0x40]
add ecx, 7
mov dword [ebx + 0x50], ecx
mov eax, edi
shl eax, cl
mov ecx, eax
mov dword [ebx + 0x4c], eax
dec ecx
mov dword [ebx + 0x54], ecx
mov eax, dword [esp + 0x40]
add eax, 9
mov edx, 0xaaaaaaab
mul edx
shr edx, 1
mov dword [ebx + 0x58], edx
mov dword [esp + 8], 2
mov dword [esp + 4], ebp
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 0x38], eax
mov dword [esp + 8], 2
mov eax, dword [ebx + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 0x40], eax
mov dword [esp + 8], 2
mov eax, dword [ebx + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x16c0], 0
mov ecx, dword [esp + 0x40]
add ecx, 6
shl edi, cl
mov dword [ebx + 0x169c], edi
mov dword [esp + 8], 4
mov dword [esp + 4], edi
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 8], eax
mov edx, dword [ebx + 0x169c]
lea ecx, [edx*4]
mov dword [ebx + 0xc], ecx
mov ebp, dword [ebx + 0x38]
test ebp, ebp
je 0x58f5fc
mov edi, dword [ebx + 0x40]
test edi, edi
je 0x58f5fc
mov ecx, dword [ebx + 0x44]
test ecx, ecx
je 0x58f5fc
test eax, eax
je 0x58f5fc
mov ecx, edx
and ecx, 0xfffffffe
add ecx, eax
mov dword [ebx + 0x16a4], ecx
lea edx, [edx + edx*2]
add eax, edx
mov dword [ebx + 0x1698], eax
mov ecx, dword [esp + 0x34]
mov dword [ebx + 0x84], ecx
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x88], eax
mov byte [ebx + 0x24], 8
mov ebx, dword [esi + 0x1c]
test ebx, ebx
je 0x58f58c
mov ebp, dword [esi + 0x20]
test ebp, ebp
je 0x58f58c
mov edi, dword [esi + 0x24]
test edi, edi
je 0x58f58c
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov dword [ebx + 0x14], 0
mov eax, dword [ebx + 8]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x18]
cmp eax, 0
jl 0x58f554
jne 0x58f559
mov dword [ebx + 4], 0x71
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0058fc70
mov dword [esi + 0x30], eax
mov dword [ebx + 0x28], 0
mov dword [esp], ebx
call fcn.005925e8
mov edx, dword [esi + 0x1c]
mov eax, dword [edx + 0x2c]
shl eax, 1
mov dword [edx + 0x3c], eax
mov ebx, dword [edx + 0x44]
mov eax, dword [edx + 0x4c]
mov word [ebx + eax*2 - 2], 0
lea ecx, [eax + eax - 2]
xor eax, eax
mov edi, ebx
rep stosb byte es:[edi], al
mov eax, dword [edx + 0x84]
lea ecx, [eax + eax*2]
shl ecx, 2
lea eax, [ecx + 0x615f60]
movzx ebx, word [ecx + 0x615f62]
mov dword [edx + 0x80], ebx
movzx ecx, word [ecx + 0x615f60]
mov dword [edx + 0x8c], ecx
movzx ecx, word [eax + 4]
mov dword [edx + 0x90], ecx
movzx eax, word [eax + 6]
mov dword [edx + 0x7c], eax
mov dword [edx + 0x6c], 0
mov dword [edx + 0x5c], 0
mov dword [edx + 0x74], 0
mov dword [edx + 0x16b4], 0
mov dword [edx + 0x78], 2
mov dword [edx + 0x60], 2
mov dword [edx + 0x68], 0
mov dword [edx + 0x48], 0
xor eax, eax
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
sub ebp, 0x10
mov edi, 2
jmp 0x58f24d
neg eax
mov dword [ebx + 0x18], eax
mov dword [ebx + 4], 0x2a
cmp eax, 2
jne 0x58f46f
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0058f98c
jmp 0x58f48b
mov eax, 0xfffffffe
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x34], 6
test ebp, ebp
jns 0x58f23f
neg ebp
xor edi, edi
jmp 0x58f24d
mov eax, 0xfffffffa
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov bp, 9
jmp 0x58f2af
mov dword [esi + 0x20], 0x58c300
mov dword [esi + 0x28], 0
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x58f22c
lea esi, [esi]
mov dword [esi + 0x24], 0x58c314
jmp 0x58f22c
mov dword [ebx + 4], 0x29a
mov eax, dword [str.insufficient_memory]
mov dword [esi + 0x18], eax
mov dword [esp], esi
call fcn.0058f100
mov eax, 0xfffffffc
jmp 0x58f539
mov eax, 0xfffffffc
jmp 0x58f539