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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x24]
test eax, eax
je 0x4f1f20
cmp byte [eax], 0x31
jne 0x4f1f20
cmp edx, 0x38
jne 0x4f1f20
test edi, edi
je 0x4f1f27
mov dword [edi + 0x18], 0
cmp dword [edi + 0x20], 0
jne 0x4f1d2f
mov dword [edi + 0x20], 0x4f58f7
mov dword [edi + 0x28], 0
cmp dword [edi + 0x24], 0
jne 0x4f1d3c
mov dword [edi + 0x24], 0x4f58e8
cmp dword [ebp - 0x18], 0xffffffff
jne 0x4f1d49
mov dword [ebp - 0x18], 6
test ebx, ebx
jns 0x4f1d58
neg ebx
mov dword [ebp - 0x10], 0
jmp 0x4f1d6e
mov dword [ebp - 0x10], 1
cmp ebx, 0xf
jle 0x4f1d6e
sub ebx, 0x10
mov dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x1c]
dec eax
cmp eax, 8
ja 0x4f1f27
cmp ecx, 8
jne 0x4f1f27
cmp ebx, 7
jle 0x4f1f27
cmp ebx, 0xf
jg 0x4f1f27
cmp dword [ebp - 0x18], 0
js 0x4f1f27
cmp dword [ebp - 0x18], 9
jg 0x4f1f27
cmp dword [ebp - 0x20], 0
js 0x4f1f27
cmp dword [ebp - 0x20], 4
jg 0x4f1f27
cmp ebx, 8
jne 0x4f1dc5
mov bl, 9
push edx
push 0x16c4
push 1
push dword [edi + 0x28]
call dword [edi + 0x20]
add esp, 0x10
mov esi, eax
mov eax, 0xfffffffc
test esi, esi
je 0x4f1f2c
mov ecx, dword [ebp - 0x10]
mov eax, 1
mov dword [esi + 0x18], ecx
mov cl, bl
shl eax, cl
mov dword [esi + 0x2c], eax
mov ecx, dword [ebp - 0x1c]
dec eax
add ecx, 7
mov dword [esi + 0x34], eax
mov eax, 1
shl eax, cl
mov dword [esi + 0x50], ecx
mov ecx, eax
mov dword [esi + 0x4c], eax
dec ecx
mov eax, dword [esi + 0x50]
mov edx, 3
mov dword [esi + 0x54], ecx
add eax, 2
mov ecx, edx
xor edx, edx
div ecx
mov dword [esi + 0x58], eax
mov dword [edi + 0x1c], esi
mov dword [esi], edi
mov dword [esi + 0x1c], 0
mov dword [esi + 0x30], ebx
push eax
push 2
push dword [esi + 0x2c]
push dword [edi + 0x28]
call dword [edi + 0x20]
add esp, 0xc
mov dword [esi + 0x38], eax
push 2
push dword [esi + 0x2c]
push dword [edi + 0x28]
call dword [edi + 0x20]
add esp, 0xc
mov dword [esi + 0x40], eax
push 2
push dword [esi + 0x4c]
push dword [edi + 0x28]
call dword [edi + 0x20]
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
mov dword [esi + 0x44], eax
add ecx, 6
mov eax, 1
shl eax, cl
mov dword [esi + 0x16c0], 0
mov dword [esi + 0x169c], eax
push 4
push eax
push dword [edi + 0x28]
call dword [edi + 0x20]
mov edx, dword [esi + 0x169c]
mov ecx, eax
mov dword [esi + 8], eax
lea eax, [edx*4]
add esp, 0x10
mov dword [esi + 0xc], eax
cmp dword [esi + 0x38], 0
je 0x4f1ebf
cmp dword [esi + 0x40], 0
je 0x4f1ebf
cmp dword [esi + 0x44], 0
je 0x4f1ebf
test ecx, ecx
jne 0x4f1ee1
sub esp, 0xc
mov eax, dword [str.insufficient_memory]
mov dword [esi + 4], 0x29a
mov dword [edi + 0x18], eax
push edi
call fcn.004efcb9
mov eax, 0xfffffffc
add esp, 0x10
jmp 0x4f1f2c
mov eax, edx
and eax, 0xfffffffe
lea eax, [ecx + eax]
mov ecx, dword [ebp - 0x18]
mov dword [esi + 0x16a4], eax
lea eax, [edx + edx*2]
add eax, dword [esi + 8]
mov dword [esi + 0x84], ecx
mov dword [esi + 0x1698], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x88], eax
mov byte [esi + 0x24], 8
mov dword [ebp + 8], edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004f1c0d
mov eax, 0xfffffffa
jmp 0x4f1f2c
mov eax, 0xfffffffe
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret