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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [esp + 0x48]
mov esi, 0xfffffffa
test eax, eax
je 0x64e617
cmp dword [esp + 0x4c], 0x38
jne 0x64e617
movzx eax, byte [eax]
cmp eax, 0x31
jne 0x64e617
mov ebp, dword [esp + 0x30]
mov esi, 0xfffffffe
test ebp, ebp
je 0x64e617
mov eax, dword [esp + 0x44]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
mov dword [ebp + 0x18], 0
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x64e40d
mov dword [ebp + 0x20], 0x6512d0
mov eax, 0x6512d0
mov dword [ebp + 0x28], 0
cmp dword [ebp + 0x24], 0
jne 0x64e41a
mov dword [ebp + 0x24], 0x6512f0
cmp edi, 0xffffffff
mov ebx, 6
cmovne ebx, edi
mov dword [esp + 0x10], ebx
test ecx, ecx
js 0x64e43f
lea edi, [ecx - 0x10]
cmp ecx, 0xf
setg bl
cmovg ecx, edi
movzx ebx, bl
inc ebx
jmp 0x64e443
neg ecx
xor ebx, ebx
cmp dword [esp + 0x18], 4
ja 0x64e617
cmp dword [esp + 0x10], 9
ja 0x64e617
cmp edx, 8
jne 0x64e617
mov edx, dword [esp + 0x14]
dec edx
cmp edx, 8
ja 0x64e617
mov edx, ecx
and edx, 0xfffffff8
cmp edx, 8
jne 0x64e617
cmp ecx, 8
jne 0x64e48c
cmp ebx, 1
jne 0x64e617
cmp ecx, 8
mov edx, 9
cmovne edx, ecx
mov dword [esp + 0xc], edx
mov ecx, dword [ebp + 0x28]
mov dword [esp], ecx
mov dword [esp + 8], 0x16c4
mov dword [esp + 4], 1
call eax
mov edi, eax
mov esi, 0xfffffffc
test edi, edi
je 0x64e617
mov dword [ebp + 0x1c], edi
mov dword [edi], ebp
mov dword [edi + 4], 0x2a
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], 0
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], ecx
mov ebx, 1
shl ebx, cl
mov dword [edi + 0x2c], ebx
lea eax, [ebx - 1]
mov dword [edi + 0x34], eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + 7]
mov edx, eax
mov dword [edi + 0x50], ecx
mov eax, 1
shl eax, cl
mov dword [edi + 0x4c], eax
dec eax
mov dword [edi + 0x54], eax
lea eax, [edx + 9]
mov ecx, 0xaaaaaaab
mul ecx
shr edx, 1
mov dword [edi + 0x58], edx
mov eax, dword [ebp + 0x28]
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 8], 2
call dword [ebp + 0x20]
mov dword [edi + 0x38], eax
mov eax, dword [edi + 0x2c]
mov ecx, dword [ebp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], 2
call dword [ebp + 0x20]
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x4c]
mov ecx, dword [ebp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], 2
call dword [ebp + 0x20]
mov dword [edi + 0x44], eax
mov dword [edi + 0x16c0], 0
mov ecx, dword [esp + 0x14]
add ecx, 6
mov eax, 1
shl eax, cl
mov dword [edi + 0x169c], eax
mov ecx, eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], 4
call dword [ebp + 0x20]
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 0x64e600
cmp dword [edi + 0x40], 0
je 0x64e600
cmp dword [edi + 0x44], 0
je 0x64e600
test eax, eax
je 0x64e600
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 + 0x10]
mov dword [edi + 0x84], eax
mov eax, dword [esp + 0x18]
mov dword [edi + 0x88], eax
mov byte [edi + 0x24], 8
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
jmp 0x64e730
mov dword [edi + 4], 0x29a
mov eax, dword [str.insufficient_memory]
mov dword [ebp + 0x18], eax
mov dword [esp], ebp
call fcn.0064e630
mov eax, esi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push edi
push esi
sub esp, 0xc
mov edi, dword [esp + 0x18]
mov dword [esp], edi
call fcn.0064ece0
mov esi, eax
test esi, esi
jne 0x64e7fa
mov edi, dword [edi + 0x1c]
mov eax, dword [edi + 0x2c]
add eax, eax
mov dword [edi + 0x3c], eax
mov eax, dword [edi + 0x44]
mov ecx, dword [edi + 0x4c]
mov word [eax + ecx*2 - 2], 0
mov eax, dword [edi + 0x44]
mov ecx, dword [edi + 0x4c]
lea ecx, [ecx + ecx - 2]
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.007ce3c0
mov eax, dword [edi + 0x84]
lea eax, [eax + eax*2]
movzx ecx, word [eax*4 + 0x7e3e7e]
mov dword [edi + 0x80], ecx
movzx ecx, word [eax*4 + 0x7e3e7c]
mov dword [edi + 0x8c], ecx
movzx ecx, word [eax*4 + 0x7e3e80]
mov dword [edi + 0x90], ecx
movzx eax, word [eax*4 + 0x7e3e82]
mov dword [edi + 0x7c], eax
mov dword [edi + 0x6c], 0
mov dword [edi + 0x5c], 0
mov dword [edi + 0x74], 0
mov dword [edi + 0x16b4], 0
mov dword [edi + 0x78], 2
mov dword [edi + 0x60], 2
mov dword [edi + 0x68], 0
mov dword [edi + 0x48], 0
mov eax, esi
add esp, 0xc
pop esi
pop edi
ret