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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, edx
mov dword [ebp - 4], 1
cmp byte [eax], 0x31
mov esi, ecx
jne 0x4ce188
test esi, esi
jne 0x4cde5e
pop edi
mov eax, 0xfffffffe
pop esi
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x20]
mov dword [esi + 0x18], 0
test ecx, ecx
jne 0x4cde7b
mov dword [esi + 0x28], ecx
mov ecx, 0x4d3af0
mov dword [esi + 0x20], 0x4d3af0
cmp dword [esi + 0x24], 0
mov eax, ecx
jne 0x4cde8a
mov dword [esi + 0x24], 0x4d3b30
cmp edi, 0xffffffff
mov edx, 6
cmovne edx, edi
cmovne ecx, eax
mov edi, dword [ebp + 8]
mov dword [ebp + 0xc], edx
test edi, edi
jns 0x4cdead
mov dword [ebp - 4], 0
neg edi
jmp 0x4cdebc
cmp edi, 0xf
jle 0x4cdebc
mov dword [ebp - 4], 2
sub edi, 0x10
lea eax, [edi - 8]
cmp eax, 7
ja 0x4cde51
cmp edx, 9
ja 0x4cde51
push ebx
push 0x16c4
push 1
push dword [esi + 0x28]
mov eax, 9
cmp edi, 8
cmove edi, eax
call ecx
mov ebx, eax
test ebx, ebx
je 0x4ce17a
mov eax, dword [ebp - 4]
mov ecx, edi
mov dword [esi + 0x1c], ebx
mov edx, 1
shl edx, cl
mov dword [ebx + 0x18], eax
push 2
mov dword [ebx], esi
lea eax, [edx - 1]
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x30], edi
mov dword [ebx + 0x2c], edx
mov dword [ebx + 0x34], eax
mov dword [ebx + 0x50], 0xe
mov dword [ebx + 0x4c], 0x4000
mov dword [ebx + 0x54], 0x3fff
mov dword [ebx + 0x58], 5
mov eax, dword [esi + 0x20]
push edx
push dword [esi + 0x28]
call eax
push 2
push dword [ebx + 0x2c]
mov dword [ebx + 0x38], eax
push dword [esi + 0x28]
mov eax, dword [esi + 0x20]
call eax
push 2
push dword [ebx + 0x4c]
mov dword [ebx + 0x40], eax
push dword [esi + 0x28]
mov eax, dword [esi + 0x20]
call eax
push 4
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x16c0], 0
mov dword [ebx + 0x169c], 0x2000
mov eax, dword [esi + 0x20]
push 0x2000
push dword [esi + 0x28]
call eax
cmp dword [ebx + 0x38], 0
mov edx, eax
mov edi, dword [ebx + 0x169c]
mov dword [ebx + 8], edx
lea ecx, [edi*4]
mov dword [ebx + 0xc], ecx
je 0x4ce164
cmp dword [ebx + 0x40], 0
je 0x4ce164
cmp dword [ebx + 0x44], 0
je 0x4ce164
test edx, edx
je 0x4ce164
mov eax, edi
mov dword [ebx + 0x88], 0
shr eax, 1
mov byte [ebx + 0x24], 8
lea eax, [edx + eax*2]
mov dword [ebx + 0x16a4], eax
lea eax, [edx + edi*2]
add eax, edi
mov dword [ebx + 0x1698], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x84], eax
mov ecx, dword [esi + 0x1c]
test ecx, ecx
je 0x4ce154
cmp dword [esi + 0x20], 0
je 0x4ce154
cmp dword [esi + 0x24], 0
je 0x4ce154
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov edx, dword [ecx + 0x18]
mov eax, dword [ecx + 8]
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x10], eax
test edx, edx
jns 0x4ce03d
neg edx
mov dword [ecx + 0x18], edx
test edx, edx
mov eax, 0x71
mov edi, 0x2a
cmovne eax, edi
mov dword [ecx + 4], eax
xor eax, eax
cmp edx, 2
setne al
mov dword [esi + 0x30], eax
lea eax, [ecx + 0x94]
mov dword [ecx + 0xb18], eax
lea eax, [ecx + 0x988]
mov dword [ecx + 0xb24], eax
lea eax, [ecx + 0xa7c]
mov dword [ecx + 0xb30], eax
xor eax, eax
mov dword [ecx + 0x28], 0
mov dword [ecx + 0xb20], 0x816d68
mov dword [ecx + 0xb2c], 0x816d90
mov dword [ecx + 0xb38], 0x816d7c
mov word [ecx + 0x16b8], ax
mov dword [ecx + 0x16bc], eax
call fcn.004d2310
mov esi, dword [esi + 0x1c]
xor edx, edx
xor edi, edi
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x4c]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x44]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x44]
call fcn.0064f890
mov eax, dword [esi + 0x84]
add esp, 0xc
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x700e82]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x700e80]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x700e84]
mov dword [esi + 0x90], eax
movzx eax, word [ecx*4 + 0x700e86]
mov dword [esi + 0x7c], eax
mov eax, edi
pop ebx
mov dword [esi + 0x6c], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x74], edi
mov dword [esi + 0x16b4], edi
mov dword [esi + 0x68], edi
mov dword [esi + 0x48], edi
pop edi
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
pop esi
mov esp, ebp
pop ebp
ret 8
mov edi, 0xfffffffe
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [str.insufficient_memory]
mov ecx, esi
mov dword [ebx + 4], 0x29a
mov dword [esi + 0x18], eax
call fcn.004cec50
pop ebx
pop edi
mov eax, 0xfffffffc
pop esi
mov esp, ebp
pop ebp
ret 8
pop edi
mov eax, 0xfffffffa
pop esi
mov esp, ebp
pop ebp
ret 8