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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1458
call fcn.00406260
mov eax, dword [0x40a004]
xor eax, esp
mov dword [esp + 0x1454], eax
movups xmm0, xmmword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x10], esi
push edi
movups xmmword [esp + 0x40], xmm0
test esi, esi
je 0x404af9
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 + 0x10], ecx
cmp dword [esp + 0x40], ecx
jne 0x40482e
test al, al
jne 0x40482e
mov dword [esp + 0x10], 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 + 0x20]
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 + 0x18], edx
imul edx, dword [esp + 0x30]
add eax, ecx
add edx, eax
mov dword [esp + 0x20], edx
mov eax, edx
xor edx, edx
div edi
mov eax, dword [esp + 0x20]
lea ecx, [eax - 1]
test edx, edx
jne 0x404866
add ecx, edi
mov esi, dword [esi]
lea edi, [esp + 0x1050]
mov dword [esp + 0x28], ecx
shl ecx, 0xa
add esi, ecx
mov dword [esp + 0x2c], ecx
mov ecx, pe_nt_image_headers32
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
cmp esi, dword [esp + 0x18]
jae 0x404af9
mov edi, dword [esp + 0x14]
mov ecx, eax
shl ecx, 0xa
mov dword [esp + 0x24], ecx
nop
mov ecx, dword [edi + 0x14]
xor edx, edx
div ecx
mov dword [esp + 0xc], ecx
cmp edx, 1
jne 0x4048cd
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
dec eax
add edx, 0xfffffc00
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0xc], ecx
jmp 0x4048d1
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x34], 0
je 0x404979
mov eax, esi
and eax, 0x7f
mov dword [esp + 0x18], eax
jne 0x404965
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 + 0xc], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + eax*8 + 0x450]
mov eax, dword [esp + eax*8 + 0x454]
mov dword [esp + 0x14], ecx
jmp 0x40498e
mov eax, dword [edi]
mov dword [esp + 0xc], ecx
mov esi, dword [edx + eax]
mov eax, dword [edx + eax + 4]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x10]
push 0
push dword [edi + 0x18]
push 0
push eax
call fcn.004061c0
cmp dword [esp + 0x40], 0
mov cl, byte [esp + 0x48]
mov dword [esp + 0x18], eax
jne 0x4049c5
test cl, cl
jne 0x4049c5
mov eax, dword [esp + 0x44]
mov edx, 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x3c], 0
jmp 0x4049d8
cmp eax, dword [esp + 0x44]
jne 0x4049d6
test edx, edx
jne 0x4049d6
mov edx, 1
jmp 0x4049d8
xor edx, edx
cmp dword [esp + 0x40], 0
jne 0x404a0c
mov eax, dword [edi + 0x10]
mov dword [esp + 0x1c], eax
test cl, cl
jne 0x4049ed
dec esi
jmp 0x404a3d
mov ecx, eax
imul ecx, dword [esp + 0x30]
test edx, edx
je 0x4049fd
dec esi
add esi, ecx
jmp 0x404a3d
neg esi
mov dword [esp + 0x1c], eax
sbb esi, esi
neg esi
dec esi
add esi, ecx
jmp 0x404a3d
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x1c], ecx
test edx, edx
je 0x404a23
mov eax, dword [edi + 0x14]
mov dword [esp + 0xc], eax
sub eax, ecx
dec eax
jmp 0x404a3b
mov esi, ecx
mov eax, ecx
neg esi
not eax
cmp dword [esp + 0x10], 0
cmove esi, eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0xc], eax
add esi, eax
mov eax, dword [esp + 0x14]
push 0
push eax
push 0
push eax
call fcn.00406160
mov eax, edx
xor ecx, ecx
mul esi
lea eax, [esi - 1]
sub eax, edx
mov dword [esp + 0x14], eax
sbb ecx, ecx
mov dword [esp + 0x38], ecx
xor ecx, ecx
cmp dword [esp + 0x40], ecx
je 0x404a7a
cmp byte [esp + 0x48], 3
je 0x404a7a
mov ecx, dword [esp + 0x30]
inc ecx
imul ecx, dword [esp + 0x1c]
mov esi, dword [edi]
xor eax, eax
add ecx, dword [esp + 0x14]
push 0
push dword [esp + 0x10]
adc eax, dword [esp + 0x40]
push eax
push ecx
call fcn.004061c0
mov edx, dword [esp + 0x18]
imul edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x24]
add ecx, esi
add edx, eax
xor eax, eax
shl edx, 0xa
cmp dword [edi + 4], 0x10
lea edx, [edx + esi]
je 0x404ab9
cmp dword [esp + 0x40], eax
setne al
push eax
push ecx
lea ecx, [esp + 0x1058]
call fcn.00403e00
mov esi, dword [esp + 0x18]
add esp, 8
mov eax, dword [esp + 0x20]
inc esi
add dword [esp + 0x24], 0x400
inc eax
inc dword [esp + 0x28]
add dword [esp + 0x2c], 0x400
mov dword [esp + 0x10], esi
mov dword [esp + 0x20], eax
cmp esi, dword [edi + 0x10]
jb 0x4048a0
mov ecx, dword [esp + 0x145c]
pop edi
pop esi
xor ecx, esp
call fcn.004054bf
mov esp, ebp
pop ebp
ret