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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1458
call fcn.00405b90
mov eax, dword [0x408004]
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 0x404d69
mov edi, dword [esi + 0x20]
cmp edi, 1
je 0x40497a
cmp edi, 2
jne 0x404972
cmp dword [esp + 0x40], 0
jne 0x404972
cmp byte [esp + 0x48], 2
jb 0x40497a
xor edx, edx
mov dword [esp + 0x34], edx
jmp 0x4049f5
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 0x404a9e
test al, al
jne 0x404a9e
mov dword [esp + 0x10], 2
test edx, edx
je 0x404a99
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.00404070
lea eax, [esp + 0x458]
push 0
push eax
mov edx, eax
lea ecx, [esp + 0xc60]
call fcn.00404070
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov al, byte [esp + 0x48]
jmp 0x404a9e
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 0x404ad6
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, 0x100
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
cmp esi, dword [esp + 0x18]
jae 0x404d69
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 0x404b3d
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 0x404b41
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x34], 0
je 0x404be9
mov eax, esi
and eax, 0x7f
mov dword [esp + 0x18], eax
jne 0x404bd5
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.00404070
lea eax, [esp + 0x458]
push 0
push eax
mov edx, eax
lea ecx, [esp + 0x860]
call fcn.00404070
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 0x404bfe
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.00405af0
cmp dword [esp + 0x40], 0
mov cl, byte [esp + 0x48]
mov dword [esp + 0x18], eax
jne 0x404c35
test cl, cl
jne 0x404c35
mov eax, dword [esp + 0x44]
mov edx, 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x3c], 0
jmp 0x404c48
cmp eax, dword [esp + 0x44]
jne 0x404c46
test edx, edx
jne 0x404c46
mov edx, 1
jmp 0x404c48
xor edx, edx
cmp dword [esp + 0x40], 0
jne 0x404c7c
mov eax, dword [edi + 0x10]
mov dword [esp + 0x1c], eax
test cl, cl
jne 0x404c5d
dec esi
jmp 0x404cad
mov ecx, eax
imul ecx, dword [esp + 0x30]
test edx, edx
je 0x404c6d
dec esi
add esi, ecx
jmp 0x404cad
neg esi
mov dword [esp + 0x1c], eax
sbb esi, esi
neg esi
dec esi
add esi, ecx
jmp 0x404cad
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x1c], ecx
test edx, edx
je 0x404c93
mov eax, dword [edi + 0x14]
mov dword [esp + 0xc], eax
sub eax, ecx
dec eax
jmp 0x404cab
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.00405a20
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 0x404cea
cmp byte [esp + 0x48], 3
je 0x404cea
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.00405af0
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 0x404d29
cmp dword [esp + 0x40], eax
setne al
push eax
push ecx
lea ecx, [esp + 0x1058]
call fcn.00404070
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 0x404b10
mov ecx, dword [esp + 0x145c]
pop edi
pop esi
xor ecx, esp
call fcn.00404d7d
mov esp, ebp
pop ebp
ret