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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18
mov dword [ebp - 0x20], 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x1c], ecx
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x24]
test eax, eax
je 0x5173a5
cmp byte [eax], 0x31
setne dl
cmp ecx, 0x38
setne al
or eax, edx
test al, 1
je 0x5173af
mov eax, 0xfffffffa
jmp 0x5175ba
mov eax, 0xfffffffe
test edi, edi
je 0x5175ba
mov dword [edi + 0x18], 0
cmp dword [edi + 0x20], 0
jne 0x5173d7
mov dword [edi + 0x20], 0x519fa8
mov dword [edi + 0x28], 0
cmp dword [edi + 0x24], 0
jne 0x5173e4
mov dword [edi + 0x24], 0x519fbb
cmp dword [ebp - 0x10], 0xffffffff
jne 0x5173f1
mov dword [ebp - 0x10], 6
test ebx, ebx
jns 0x517400
neg ebx
mov dword [ebp - 0x20], 0
jmp 0x51740f
cmp ebx, 0xf
jle 0x51740f
mov dword [ebp - 0x20], 2
sub ebx, 0x10
mov eax, dword [ebp - 0x18]
dec eax
cmp eax, 8
seta dl
cmp dword [ebp - 0x14], 8
setne al
or eax, edx
test al, 1
jne 0x51745e
cmp ebx, 7
setle dl
cmp ebx, 0xf
setg al
or eax, edx
test al, 1
jne 0x51745e
xor eax, eax
mov edx, dword [ebp - 0x10]
shr edx, 0x1f
cmp dword [ebp - 0x10], 9
setg al
or edx, eax
jne 0x51745e
xor eax, eax
mov edx, dword [ebp - 0x1c]
shr edx, 0x1f
cmp dword [ebp - 0x1c], 4
setg al
or edx, eax
je 0x517468
mov eax, 0xfffffffe
jmp 0x5175ba
cmp ebx, 8
jne 0x51746f
mov bl, 9
push 0x16c0
push 1
push dword [edi + 0x28]
call dword [edi + 0x20]
add esp, 0xc
mov esi, eax
mov eax, 0xfffffffc
test esi, esi
je 0x5175ba
mov eax, dword [ebp - 0x20]
mov cl, bl
mov dword [esi + 0x18], eax
mov eax, 1
shl eax, cl
mov dword [esi + 0x2c], eax
mov ecx, dword [ebp - 0x18]
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 [ebp - 0x18]
mov edx, 3
mov dword [esi + 0x54], ecx
add eax, 9
mov ecx, edx
xor edx, edx
div ecx
mov dword [edi + 0x1c], esi
mov dword [esi], edi
mov dword [esi + 0x1c], 0
mov dword [esi + 0x30], ebx
mov dword [ebp - 0x24], 1
mov dword [esi + 0x58], eax
push 2
push dword [esi + 0x2c]
push dword [edi + 0x28]
call dword [edi + 0x20]
mov dword [esi + 0x38], eax
push 2
push dword [esi + 0x2c]
push dword [edi + 0x28]
call dword [edi + 0x20]
mov dword [esi + 0x40], eax
push 2
push dword [esi + 0x4c]
push dword [edi + 0x28]
call dword [edi + 0x20]
mov ecx, dword [ebp - 0x18]
add ecx, 6
add esp, 0x24
shl dword [ebp - 0x24], cl
mov dword [esi + 0x44], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x169c], eax
push 4
push eax
push dword [edi + 0x28]
call dword [edi + 0x20]
mov ecx, dword [esi + 0x169c]
mov edx, eax
add esp, 0xc
mov dword [esi + 8], eax
lea eax, [ecx*4]
mov dword [esi + 0xc], eax
cmp dword [esi + 0x38], 0
je 0x51755d
cmp dword [esi + 0x40], 0
je 0x51755d
cmp dword [esi + 0x44], 0
je 0x51755d
test edx, edx
jne 0x517579
mov eax, dword [str.insufficient_memory]
mov dword [esi + 4], 0x29a
mov dword [edi + 0x18], eax
push edi
call fcn.005165d0
mov eax, 0xfffffffc
jmp 0x5175ba
mov eax, ecx
and eax, 0xfffffffe
lea eax, [edx + eax]
mov dword [esi + 0x16a4], eax
imul eax, ecx, 3
mov ecx, dword [ebp - 0x10]
lea eax, [edx + eax]
mov dword [esi + 0x84], ecx
mov dword [esi + 0x1698], eax
mov cl, byte [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov byte [esi + 0x24], cl
mov dword [esi + 0x88], eax
mov dword [ebp + 8], edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0051722b
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret