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

Disassembly:
sub esp, 0x54
push edi
mov edi, dword [esp + 0x68]
mov eax, ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 4], eax
mov dword [ecx], 0
test edi, edi
ja 0x470880
mov ecx, dword [esp + 0x6c]
push 0
push 0
call fcn.0040b700
pop edi
add esp, 0x54
ret 0x24
mov ecx, dword [eax + 0xec]
mov eax, dword [eax + 0x10c]
mov edx, 1
shl edx, cl
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edx
cmp edx, eax
ja 0x4708a3
mov dword [esp + 0xc], eax
push ebp
mov ebp, dword [esp + 0x70]
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x4708b4
call fcn.004109a0
mov edx, dword [esp + 0x7c]
push ebx
push esi
mov ecx, ebp
mov dword [esp + 0x14], eax
xor esi, esi
mov byte [edx], 0
call fcn.0040c140
test al, al
jne 0x470b65
mov ebx, dword [esp + 0x7c]
mov eax, ebx
and eax, 0x10
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], 1
jmp 0x4708f8
mov edi, dword [esp + 0x74]
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x470933
test bl, 1
je 0x470912
mov eax, 0x2b830000
push eax
push 0
mov ecx, ebp
call fcn.0040b700
jmp 0x47095a
mov eax, ebx
and al, 0x80
movsx eax, al
neg eax
sbb eax, eax
and eax, 0x10000
add eax, 0x2b810000
push eax
push 0
mov ecx, ebp
call fcn.0040b700
jmp 0x47095a
mov ecx, dword [esp + 0x80]
mov edx, dword [ecx]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x6c]
push ebx
push ebp
push edi
push eax
push ecx
mov ecx, dword [esp + 0x28]
push edx
call fcn.0046f030
mov esi, eax
cmp esi, edi
jbe 0x470960
mov esi, edi
test esi, esi
jbe 0x4709a8
cmp esi, edi
jae 0x470971
mov eax, dword [esp + 0x20]
dec eax
not eax
and esi, eax
test esi, esi
jbe 0x4709a8
mov eax, dword [ebp + 0x48]
mov ecx, ebx
and cl, 0x60
xor edx, edx
cmp cl, 0x20
sete dl
add edx, 4
mov ecx, edx
test eax, eax
je 0x4709a8
cmp ecx, 4
jne 0x470999
test byte [ebp + 0x14], 0x80
jne 0x4709a8
push esi
push dword [esp + 0x6c]
push ecx
push eax
lea ecx, [ebp + 0x30]
call fcn.00410d70
cmp esi, edi
je 0x470c1e
mov eax, dword [ebp + 0x4c]
mov edx, eax
and edx, 0x80000000
mov ecx, eax
je 0x4709c7
and ecx, 0xff000000
jmp 0x4709cd
and ecx, 0xffff0000
cmp ecx, 0x2b850000
je 0x470c28
mov ecx, eax
test edx, edx
je 0x4709e7
and ecx, 0xff000000
jmp 0x4709ed
and ecx, 0xffff0000
cmp ecx, 0x2b890000
je 0x470c28
test edx, edx
je 0x470a04
and eax, 0xff000000
jmp 0x470a09
and eax, 0xffff0000
cmp eax, 0x120000
jne 0x470a19
test bl, 2
jne 0x470c28
mov eax, dword [esp + 0x10]
add eax, 0x38
push eax
test bl, 1
mov eax, 0
setne al
push ebp
lea ecx, [esp + 0x34]
inc eax
push eax
call fcn.0040bfd0
xor ecx, ecx
mov eax, esi
add eax, dword [esp + 0x6c]
mov edx, edi
adc ecx, dword [esp + 0x70]
sub edx, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x40], ecx
mov ecx, dword [edx + 0xec]
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x68]
xor edi, edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], eax
mov edi, ebx
and edi, 0x20
lea eax, [esi + ecx]
mov byte [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x50], eax
je 0x470a98
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x54], ecx
jmp 0x470aa4
mov eax, dword [esp + 0x7c]
neg eax
sbb eax, eax
mov dword [esp + 0x54], eax
mov eax, dword [edx + 0xd8]
test eax, eax
jne 0x470ac0
call fcn.004175a0
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x58], ecx
jmp 0x470ac5
dec eax
mov dword [esp + 0x58], eax
test byte [ebp + 0x14], 0x20
je 0x470ad3
mov dword [esp + 0x58], 0
mov eax, dword [edx + 0xdc]
mov dword [esp + 0x5c], eax
test eax, eax
jne 0x470afa
test byte [edx + 0xd4], 0x40
mov dword [esp + 0x5c], 1
jne 0x470afa
mov dword [esp + 0x5c], 3
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
call dword [esp + 0x1c]
mov ecx, eax
add esp, 8
mov dword [esp + 0x1c], ecx
cmp ecx, 2
jne 0x470b49
mov eax, dword [esp + 0x28]
test dword [esp + 0x5c], eax
je 0x470b29
mov edx, dword [esp + 0x80]
mov dword [edx], eax
cmp byte [esp + 0x24], 0
je 0x470b49
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0xc0]
mov edx, dword [eax + 0x14]
add ecx, 0xc0
call edx
mov ecx, dword [esp + 0x1c]
test edi, edi
je 0x470b71
cmp ecx, 2
jne 0x470b71
inc dword [esp + 0x78]
mov ecx, ebp
call fcn.0040c140
test al, al
je 0x4708f0
pop esi
pop ebx
pop ebp
xor eax, eax
pop edi
add esp, 0x54
ret 0x24
mov ecx, dword [esp + 0x74]
mov eax, dword [ebp + 0x4c]
sub ecx, esi
cmp ecx, dword [esp + 0x18]
seta dl
test eax, eax
jns 0x470b8c
and eax, 0xff000000
jmp 0x470b91
and eax, 0xffff0000
cmp eax, 0x2b820000
jne 0x470ba4
xor eax, eax
test dl, dl
sete al
add eax, 0x10
jmp 0x470bae
xor eax, eax
test dl, dl
sete al
add eax, 0x12
mov edx, dword [esp + 0x88]
mov dword [edx], eax
mov edx, dword [ebp + 0x48]
test edx, edx
je 0x470bd0
push ecx
mov ecx, dword [esp + 0x6c]
add ecx, esi
push ecx
push eax
push edx
lea ecx, [ebp + 0x30]
call fcn.00410d70
mov eax, dword [esp + 0x1c]
sub eax, 1
je 0x470bf4
sub eax, 1
jne 0x470c28
mov edx, dword [esp + 0x84]
mov eax, esi
pop esi
pop ebx
pop ebp
mov byte [edx], 1
pop edi
add esp, 0x54
ret 0x24
test bl, 1
jne 0x470c0d
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x68]
push ebp
push esi
push eax
push ecx
call fcn.0040b760
add esp, 0x10
mov esi, dword [esp + 0x74]
xor edx, edx
mov dword [ebp + 0x4c], 0
mov word [ebp + 0x50], dx
mov eax, dword [esp + 0x84]
mov byte [eax], 1
mov eax, esi
pop esi
pop ebx
pop ebp
pop edi
add esp, 0x54
ret 0x24