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

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
test esi, esi
je 0x470dcf
mov ecx, dword [esi + 0x20]
mov dword [esi + 0x18], 0
test ecx, ecx
jne 0x470adc
mov dword [esi + 0x28], ecx
mov ecx, 0x4745a0
mov dword [esi + 0x20], 0x4745a0
cmp dword [esi + 0x24], 0
jne 0x470ae9
mov dword [esi + 0x24], 0x4745c0
mov eax, dword [ebp + 0x10]
cmp edx, 0xffffffff
mov ebx, 6
cmovne ebx, edx
dec eax
cmp eax, 8
ja 0x470dcf
cmp ebx, 9
ja 0x470dcf
push edi
push 0x16c4
push 1
push dword [esi + 0x28]
call ecx
mov edi, eax
add esp, 0xc
test edi, edi
je 0x470dc5
mov ecx, dword [ebp + 0x10]
mov eax, 1
mov dword [esi + 0x1c], edi
add ecx, 7
shl eax, cl
mov dword [edi + 0x4c], eax
dec eax
mov dword [edi + 0x54], eax
mov eax, 0xaaaaaaab
mov dword [edi + 0x50], ecx
add ecx, 2
mul ecx
push 2
shr edx, 1
mov dword [edi], esi
mov dword [edi + 4], 0x2a
mov dword [edi + 0x18], 1
mov dword [edi + 0x1c], 0
mov dword [edi + 0x30], 0xf
mov dword [edi + 0x2c], 0x8000
mov dword [edi + 0x34], 0x7fff
mov dword [edi + 0x58], edx
mov eax, dword [esi + 0x20]
push 0x8000
push dword [esi + 0x28]
call eax
push 2
push dword [edi + 0x2c]
mov dword [edi + 0x38], eax
push dword [esi + 0x28]
mov eax, dword [esi + 0x20]
call eax
push 2
push dword [edi + 0x4c]
mov dword [edi + 0x40], eax
push dword [esi + 0x28]
mov eax, dword [esi + 0x20]
call eax
mov ecx, dword [ebp + 0x10]
mov dword [edi + 0x44], eax
mov eax, 1
push 4
mov dword [edi + 0x16c0], 0
lea ecx, [ecx + 6]
shl eax, cl
push eax
mov dword [edi + 0x169c], eax
push dword [esi + 0x28]
mov eax, dword [esi + 0x20]
call eax
mov edx, dword [edi + 0x169c]
add esp, 0x30
cmp dword [edi + 0x38], 0
mov dword [edi + 8], eax
lea ecx, [edx*4]
mov dword [edi + 0xc], ecx
je 0x470daf
cmp dword [edi + 0x40], 0
je 0x470daf
cmp dword [edi + 0x44], 0
je 0x470daf
test eax, eax
je 0x470daf
add eax, edx
mov dword [edi + 0x84], ebx
mov dword [edi + 0x1698], eax
mov ecx, esi
lea eax, [edx - 1]
mov dword [edi + 0x88], 0
lea eax, [eax + eax*2]
mov byte [edi + 0x24], 8
mov dword [edi + 0x16a4], eax
call fcn.00470de0
test eax, eax
je 0x470c4e
mov edi, 0xfffffffe
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
mov edi, dword [esi + 0x1c]
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
test ecx, ecx
jns 0x470c86
neg ecx
mov dword [edi + 0x18], ecx
cmp ecx, 2
mov eax, 0x2a
mov edx, 0x39
cmove eax, edx
mov dword [edi + 4], eax
push 0
jne 0x470ca8
xor edx, edx
xor ecx, ecx
call fcn.00474850
jmp 0x470cb1
xor edx, edx
xor ecx, ecx
call fcn.004745d0
mov dword [esi + 0x30], eax
add esp, 4
lea eax, [edi + 0x94]
mov dword [edi + 0x28], 0xfffffffe
mov dword [edi + 0xb18], eax
mov ecx, edi
lea eax, [edi + 0x988]
mov dword [edi + 0xb20], 0x4c6c0c
mov dword [edi + 0xb24], eax
lea eax, [edi + 0xa7c]
mov dword [edi + 0xb30], eax
xor eax, eax
mov dword [edi + 0xb2c], 0x4c6cf4
mov dword [edi + 0xb38], 0x4c6d80
mov word [edi + 0x16b8], ax
mov dword [edi + 0x16bc], eax
call fcn.00472dd0
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.00498620
mov eax, dword [esi + 0x84]
add esp, 0xc
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x4c67aa]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x4c67a8]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x4c67ac]
mov dword [esi + 0x90], eax
movzx eax, word [ecx*4 + 0x4c67ae]
mov dword [esi + 0x7c], eax
mov eax, edi
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
pop ebx
pop ebp
ret
mov eax, dword [str.insufficient_memory]
mov ecx, esi
mov dword [edi + 4], 0x29a
mov dword [esi + 0x18], eax
call fcn.00471640
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
pop ebp
ret
pop esi
mov eax, 0xfffffffe
pop ebx
pop ebp
ret