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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1458
call fcn.004065e0
mov eax, dword [0x409004]
xor eax, esp
mov dword [esp + 0x1454], eax
movups xmm0, xmmword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x14], esi
push edi
movups xmmword [esp + 0x40], xmm0
test esi, esi
je 0x404aee
mov edi, dword [esi + 0x20]
cmp edi, 1
je 0x40470a
cmp edi, 2
jne 0x404702
cmp dword [esp + 0x40], 0
jne 0x404702
cmp byte [esp + 0x48], 2
jb 0x40470a
xor edx, edx
mov dword [esp + 0x34], edx
jmp 0x404785
push 0x3d0
lea eax, [esp + 0x84]
mov dword [esp + 0x38], 1
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x4c]
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x58], eax
movzx eax, byte [esp + 0x48]
cdq
mov dword [esp + 0x60], eax
mov eax, edi
mov dword [esp + 0x64], edx
cdq
mov dword [esp + 0x68], ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x7c], edx
mov edx, 1
mov dword [esp + 0x54], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], eax
mov al, byte [esp + 0x48]
xor ecx, ecx
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x40], ecx
jne 0x40482e
test al, al
jne 0x40482e
mov dword [esp + 0x14], 2
test edx, edx
je 0x404829
push 0x400
push ecx
lea eax, [esp + 0x858]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0xc50]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x450]
add dword [esp + 0x80], 1
lea edx, [esp + 0x50]
lea ecx, [esp + 0x850]
adc dword [esp + 0x84], 0
push 0
push eax
call fcn.00403e00
lea eax, [esp + 0x458]
push 0
push eax
mov edx, eax
lea ecx, [esp + 0xc60]
call fcn.00403e00
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov al, byte [esp + 0x48]
jmp 0x40482e
mov ecx, 2
mov edi, dword [esi + 0x14]
mov edx, dword [esi + 0x10]
movzx eax, al
mov dword [esp + 0x30], eax
mov eax, edi
imul eax, dword [esp + 0x44]
mov dword [esp + 0x1c], edx
imul edx, dword [esp + 0x30]
add eax, ecx
add edx, eax
mov dword [esp + 0x24], edx
mov eax, edx
xor edx, edx
div edi
test edx, edx
mov edx, dword [esp + 0x24]
lea eax, [edx - 1]
jne 0x404866
add eax, edi
mov esi, dword [esi]
lea edi, [esp + 0x1050]
shl eax, 0xa
mov ecx, pe_nt_image_headers32
add esi, eax
mov dword [esp + 0x2c], eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
cmp esi, dword [esp + 0x1c]
jae 0x404aee
mov edi, dword [esp + 0x18]
mov eax, edx
shl eax, 0xa
mov dword [esp + 0x28], eax
nop word [eax + eax]
mov ecx, dword [edi + 0x14]
mov eax, edx
xor edx, edx
mov dword [esp + 0x10], ecx
div ecx
cmp edx, 1
jne 0x4048c6
mov edx, dword [esp + 0x28]
add edx, 0xfffffc00
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], edx
jmp 0x4048ca
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x34], 0
je 0x404972
mov eax, esi
and eax, 0x7f
mov dword [esp + 0x1c], eax
jne 0x40495e
push 0x400
lea eax, [esp + 0xc54]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x850]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x450]
add dword [esp + 0x80], 1
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc50]
adc dword [esp + 0x84], 0
push 0
push eax
call fcn.00403e00
lea eax, [esp + 0x458]
push 0
push eax
mov edx, eax
lea ecx, [esp + 0x860]
call fcn.00403e00
mov eax, dword [edi + 0x14]
add esp, 0x10
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + eax*8 + 0x450]
mov eax, dword [esp + eax*8 + 0x454]
mov dword [esp + 0x18], ecx
jmp 0x404987
mov eax, dword [edi]
mov dword [esp + 0x10], ecx
mov esi, dword [edx + eax]
mov eax, dword [edx + eax + 4]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x14]
push 0
push dword [edi + 0x18]
push 0
push eax
call fcn.00406560
cmp dword [esp + 0x40], 0
mov cl, byte [esp + 0x48]
mov dword [esp + 0x1c], eax
jne 0x4049be
test cl, cl
jne 0x4049be
mov eax, dword [esp + 0x44]
mov edx, 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], 0
jmp 0x4049d1
cmp eax, dword [esp + 0x44]
jne 0x4049cf
test edx, edx
jne 0x4049cf
mov edx, 1
jmp 0x4049d1
xor edx, edx
cmp dword [esp + 0x40], 0
jne 0x404a05
mov eax, dword [edi + 0x10]
mov dword [esp + 0x20], eax
test cl, cl
jne 0x4049e6
dec esi
jmp 0x404a36
mov ecx, eax
imul ecx, dword [esp + 0x30]
test edx, edx
je 0x4049f6
dec esi
add esi, ecx
jmp 0x404a36
neg esi
mov dword [esp + 0x20], eax
sbb esi, esi
neg esi
dec esi
add esi, ecx
jmp 0x404a36
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x20], ecx
test edx, edx
je 0x404a1c
mov eax, dword [edi + 0x14]
mov dword [esp + 0x10], eax
sub eax, ecx
dec eax
jmp 0x404a34
mov esi, ecx
mov eax, ecx
neg esi
not eax
cmp dword [esp + 0x14], 0
cmove esi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
add esi, eax
mov eax, dword [esp + 0x18]
push 0
push eax
push 0
push eax
call fcn.00406520
mov eax, edx
xor ecx, ecx
mul esi
lea eax, [esi - 1]
sub eax, edx
mov dword [esp + 0x18], eax
sbb ecx, ecx
mov dword [esp + 0x38], ecx
xor ecx, ecx
cmp dword [esp + 0x40], ecx
je 0x404a73
cmp byte [esp + 0x48], 3
je 0x404a73
mov ecx, dword [esp + 0x30]
inc ecx
imul ecx, dword [esp + 0x20]
mov esi, dword [edi]
xor eax, eax
add ecx, dword [esp + 0x18]
push 0
push dword [esp + 0x14]
adc eax, dword [esp + 0x40]
push eax
push ecx
call fcn.00406560
mov edx, dword [esp + 0x1c]
imul edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
add ecx, esi
add edx, eax
xor eax, eax
shl edx, 0xa
cmp dword [edi + 4], 0x10
lea edx, [edx + esi]
je 0x404ab2
cmp dword [esp + 0x40], eax
setne al
push eax
push ecx
lea ecx, [esp + 0x1058]
call fcn.00403e00
mov esi, dword [esp + 0x1c]
add esp, 8
mov edx, dword [esp + 0x24]
inc esi
add dword [esp + 0x28], 0x400
inc edx
add dword [esp + 0x2c], 0x400
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], edx
cmp esi, dword [edi + 0x10]
jb 0x4048a0
mov ecx, dword [esp + 0x145c]
pop edi
pop esi
xor ecx, esp
call fcn.00405890
mov esp, ebp
pop ebp
ret