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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xd8
mov eax, dword [0x470004]
xor eax, esp
mov dword [esp + 0xd4], eax
push esi
mov esi, ecx
mov dword [esp + 0x40], edx
push edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x7c], 0
movzx ecx, byte [esi]
movzx eax, byte [esi + 1]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x78], 0
movzx eax, byte [esi + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
push ecx
mov dword [esp + 0x38], ecx
call fcn.00441663
movzx edi, byte [esi + 8]
add esp, 4
movzx ecx, byte [esi + 7]
shl edi, 8
or edi, ecx
mov dword [esp + 0x40], eax
movzx ecx, byte [esi + 6]
movzx eax, byte [esi + 5]
shl edi, 8
or edi, ecx
shl edi, 8
or edi, eax
mov eax, 0x1000
cmp edi, eax
cmovb edi, eax
mov al, byte [esi + 4]
mov dword [esp + 0x5c], edi
cmp al, 0xe1
jae 0x4055f1
movzx ecx, al
xor edx, edx
mov eax, ecx
mov esi, 9
div esi
mov eax, 0x38e38e39
mov esi, edx
mul ecx
mov ecx, 5
mov dword [esp + 0x50], esi
shr edx, 1
movzx eax, dl
xor edx, edx
div ecx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x54], edx
lea ecx, [edx + esi]
mov esi, 0x300
shl esi, cl
add esi, 0x736
test eax, eax
je 0x40555f
cmp esi, dword [esp + 0xbc]
je 0x40558c
push eax
push 0x470bd0
call dword [0x470bd4]
lea eax, [esi + esi]
push eax
push 0x470bd0
call dword [0x470bd0]
add esp, 0x10
mov dword [esp + 0x78], eax
mov dword [esp + 0xbc], esi
test eax, eax
je 0x4055f5
mov ecx, dword [esp + 0x7c]
test ecx, ecx
je 0x40559d
cmp edi, dword [esp + 0x90]
je 0x4055de
push ecx
push 0x470bd0
call dword [0x470bd4]
push edi
push 0x470bd0
call dword [0x470bd0]
add esp, 0x10
mov dword [esp + 0x7c], eax
test eax, eax
jne 0x4055da
push dword [esp + 0x78]
push 0x470bd0
call dword [0x470bd4]
add esp, 8
xor eax, eax
mov dword [esp + 0x78], eax
jmp 0x4055f5
mov eax, dword [esp + 0x78]
movups xmm0, xmmword [esp + 0x50]
mov dword [esp + 0x90], edi
movups xmmword [esp + 0x68], xmm0
jmp 0x4055fc
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x34]
xor esi, esi
xor edx, edx
mov dword [esp + 0x8c], esi
mov dword [esp + 0xb4], 1
mov dword [esp + 0xb0], esi
mov dword [esp + 0xc0], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0xb8], 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 9
test ecx, ecx
je 0x4057c7
sub ecx, edx
mov dword [esp + 0x20], 0
mov edx, dword [esp + 0x44]
mov eax, 0x100000
cmp ecx, eax
mov dword [esp + 0x3c], 0
cmova ecx, eax
sub edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x28], ecx
cmp eax, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
sete al
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x48]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x40]
cmp edx, 0x100000
mov dword [esp + 0x38], eax
mov eax, 0x100000
cmova edx, eax
xor eax, eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
nop
xor eax, eax
mov dword [esp + 0x1c], edx
cmp esi, edi
mov edx, edi
cmove esi, eax
sub edx, esi
mov dword [esp + 0x8c], esi
cmp ecx, edx
ja 0x4056dd
lea edi, [esi + ecx]
lea eax, [esp + 0x4c]
push eax
xor eax, eax
cmp ecx, edx
mov edx, edi
lea ecx, [esp + 0x6c]
cmovbe eax, dword [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x30]
call fcn.00402b90
mov ecx, dword [esp + 0x2c]
mov edi, eax
mov eax, dword [esp + 0x9c]
add dword [esp + 0x34], ecx
sub eax, esi
sub dword [esp + 0x3c], ecx
add dword [esp + 0x40], ecx
push eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x90]
add eax, esi
mov esi, dword [esp + 0x4c]
push eax
push esi
call fcn.0043e5c0
mov eax, dword [esp + 0x38]
add esp, 0x1c
mov ecx, dword [esp + 0x28]
add esi, eax
mov dword [esp + 0x38], esi
sub ecx, eax
mov esi, dword [esp + 0x3c]
add esi, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x3c], esi
test edi, edi
jne 0x405778
test eax, eax
je 0x405778
test ecx, ecx
je 0x405778
mov edi, dword [esp + 0x90]
mov esi, dword [esp + 0x8c]
mov edx, dword [esp + 0x2c]
jmp 0x4056c0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
add edx, esi
add dword [esp + 0x18], eax
mov ecx, dword [0x472670]
mov dword [esp + 0x14], edx
test ecx, ecx
je 0x4057a1
mov edx, dword [ecx]
lea eax, [esi + esi]
push eax
call dword [edx + 4]
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x4c], 1
je 0x4057c3
mov ecx, dword [esp + 0x34]
cmp edx, ecx
jae 0x4057c3
mov edi, dword [esp + 0x90]
mov esi, dword [esp + 0x8c]
jmp 0x405651
mov eax, dword [esp + 0x78]
push eax
push 0x470bd0
call dword [0x470bd4]
push dword [esp + 0x84]
mov dword [esp + 0x84], 0
push 0x470bd0
call dword [0x470bd4]
mov ecx, dword [esp + 0xec]
add esp, 0x10
mov eax, dword [esp + 0x40]
pop edi
pop esi
xor ecx, esp
call fcn.00405b44
mov esp, ebp
pop ebp
ret