Function at 0x470460
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 0x470490
mov ecx, dword [esp + 0x6c]
push 0
push 0
call fcn.0040b700
pop edi
add esp, 0x54
ret 0x24
mov ecx, dword [eax + 0x154]
mov eax, dword [eax + 0x174]
mov edx, 1
shl edx, cl
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edx
cmp edx, eax
ja 0x4704b3
mov dword [esp + 0xc], eax
push ebp
mov ebp, dword [esp + 0x70]
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x4704c4
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 0x470775
mov ebx, dword [esp + 0x7c]
mov eax, ebx
and eax, 0x10
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], 1
jmp 0x470508
mov edi, dword [esp + 0x74]
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x470543
test bl, 1
je 0x470522
mov eax, 0x2b830000
push eax
push 0
mov ecx, ebp
call fcn.0040b700
jmp 0x47056a
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 0x47056a
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.0046de70
mov esi, eax
cmp esi, edi
jbe 0x470570
mov esi, edi
test esi, esi
jbe 0x4705b8
cmp esi, edi
jae 0x470581
mov eax, dword [esp + 0x20]
dec eax
not eax
and esi, eax
test esi, esi
jbe 0x4705b8
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 0x4705b8
cmp ecx, 4
jne 0x4705a9
test byte [ebp + 0x14], 0x80
jne 0x4705b8
push esi
push dword [esp + 0x6c]
push ecx
push eax
lea ecx, [ebp + 0x30]
call fcn.00410d70
cmp esi, edi
je 0x47082e
mov eax, dword [ebp + 0x4c]
mov edx, eax
and edx, 0x80000000
mov ecx, eax
je 0x4705d7
and ecx, 0xff000000
jmp 0x4705dd
and ecx, 0xffff0000
cmp ecx, 0x2b850000
je 0x470838
mov ecx, eax
test edx, edx
je 0x4705f7
and ecx, 0xff000000
jmp 0x4705fd
and ecx, 0xffff0000
cmp ecx, 0x2b890000
je 0x470838
test edx, edx
je 0x470614
and eax, 0xff000000
jmp 0x470619
and eax, 0xffff0000
cmp eax, 0x120000
jne 0x470629
test bl, 2
jne 0x470838
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 + 0x154]
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 0x4706a8
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x54], ecx
jmp 0x4706b4
mov eax, dword [esp + 0x7c]
neg eax
sbb eax, eax
mov dword [esp + 0x54], eax
mov eax, dword [edx + 0x140]
test eax, eax
jne 0x4706d0
call fcn.004175a0
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x58], ecx
jmp 0x4706d5
dec eax
mov dword [esp + 0x58], eax
test byte [ebp + 0x14], 0x20
je 0x4706e3
mov dword [esp + 0x58], 0
mov eax, dword [edx + 0x144]
mov dword [esp + 0x5c], eax
test eax, eax
jne 0x47070a
test byte [edx + 0x13c], 0x40
mov dword [esp + 0x5c], 1
jne 0x47070a
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 0x470759
mov eax, dword [esp + 0x28]
test dword [esp + 0x5c], eax
je 0x470739
mov edx, dword [esp + 0x80]
mov dword [edx], eax
cmp byte [esp + 0x24], 0
je 0x470759
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x128]
mov edx, dword [eax + 0x14]
add ecx, 0x128
call edx
mov ecx, dword [esp + 0x1c]
test edi, edi
je 0x470781
cmp ecx, 2
jne 0x470781
inc dword [esp + 0x78]
mov ecx, ebp
call fcn.0040c140
test al, al
je 0x470500
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 0x47079c
and eax, 0xff000000
jmp 0x4707a1
and eax, 0xffff0000
cmp eax, 0x2b820000
jne 0x4707b4
xor eax, eax
test dl, dl
sete al
add eax, 0x10
jmp 0x4707be
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 0x4707e0
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 0x470804
sub eax, 1
jne 0x470838
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 0x47081d
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