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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x409cd6
cmp byte [eax], 0x31
jne 0x409cd6
cmp edx, 0x38
jne 0x409cd6
test esi, esi
jne 0x409ae7
mov eax, 0xfffffffe
jmp 0x409ce2
cmp dword [esi + 0x20], 0
mov dword [esi + 0x18], 0
jne 0x409b02
mov dword [esi + 0x20], 0x409f0c
mov dword [esi + 0x28], 0
cmp dword [esi + 0x24], 0
jne 0x409b0f
mov dword [esi + 0x24], 0x409f1f
mov edx, dword [ebp - 0x1c]
mov eax, 6
cmp edx, 0xffffffff
cmovne eax, edx
test edi, edi
mov dword [ebp - 0x1c], eax
jns 0x409b2a
neg edi
xor edx, edx
jmp 0x409b39
cmp edi, 0xf
mov edx, 1
jle 0x409b39
sub edi, 0x10
mov dl, 2
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], edx
dec eax
cmp eax, 8
ja 0x409add
cmp ecx, 8
jne 0x409add
lea eax, [edi - 8]
cmp eax, 7
ja 0x409add
cmp dword [ebp - 0x1c], 9
ja 0x409add
cmp dword [ebp - 0x24], 4
ja 0x409add
cmp edi, 8
mov eax, 9
cmove edi, eax
mov dword [esp + 8], 0x16c0
mov dword [esp + 4], 1
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
test eax, eax
mov ebx, eax
je 0x409cdd
mov edx, dword [ebp - 0x28]
mov ecx, edi
mov dword [esi + 0x1c], eax
mov dword [eax + 0x30], edi
mov dword [eax], esi
mov dword [eax + 0x18], edx
mov edx, 1
shl edx, cl
mov dword [eax + 0x1c], 0
lea eax, [edx - 1]
mov edi, edx
mov dword [ebx + 0x34], eax
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x2c], edx
mov edx, 1
lea ecx, [eax + 7]
add eax, 9
shl edx, cl
mov dword [ebx + 0x50], ecx
mov ecx, edx
dec ecx
mov dword [ebx + 0x4c], edx
xor edx, edx
mov dword [ebx + 0x54], ecx
mov ecx, 3
div ecx
mov dword [ebx + 0x58], eax
mov dword [esp + 8], 2
mov dword [esp + 4], edi
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 eax, dword [ebp - 0x20]
lea ecx, [eax + 6]
mov eax, 1
shl eax, cl
mov dword [ebx + 0x169c], eax
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov edx, dword [ebx + 0x169c]
cmp dword [ebx + 0x38], 0
lea ecx, [edx*4]
mov dword [ebx + 0xc], ecx
mov dword [ebx + 8], eax
je 0x409c80
cmp dword [ebx + 0x40], 0
je 0x409c80
cmp dword [ebx + 0x44], 0
je 0x409c80
test eax, eax
jne 0x409c99
mov eax, dword [str.insufficient_memory]
mov dword [ebx + 4], 0x29a
mov dword [esi + 0x18], eax
mov dword [esp], esi
call fcn.004099c4
jmp 0x409cdd
mov ecx, edx
and ecx, 0xfffffffe
lea edx, [edx + edx*2]
add ecx, eax
add eax, edx
mov dword [ebx + 0x1698], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x16a4], ecx
mov byte [ebx + 0x24], 8
mov dword [ebx + 0x84], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x88], eax
mov dword [ebp + 8], esi
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00408e95
mov eax, 0xfffffffa
jmp 0x409ce2
mov eax, 0xfffffffc
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret