Function at 0x401e00
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
mov r11, rsp
sub rsp, 0x218
mov rax, qword [0x00406730]
mov qword [rsp + 0x200], rax
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x20], rdi
mov ebp, 1
xor edi, edi
cmp dword [0x00406780], ebp
mov qword [r11 - 8], r12
mov r12d, ecx
je 0x4020d1
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
movzx eax, word [rsp + 0x58]
movzx r11d, word [rsp + 0x54]
shl r11d, 0x10
lea rdx, [0x00406668]
mov r9d, 0x20019
or r11d, eax
lea rax, [rsp + 0x38]
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov dword [0x00406788], r11d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401ed3
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea rdx, str.ApMsgFwd_Flags
mov qword [rsp + 0x28], rax
lea rax, [0x00406784]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x30], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x38]
lea rdx, [0x00406690]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401f3f
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea rdx, str.ApMsgFwd_OSVer
mov qword [rsp + 0x28], rax
lea rax, [0x00406650]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x30], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x220], rbx
lea rdx, str.SOFTWAREAlpsApoint
mov ebx, 0x104
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x230], rsi
mov dword [rsp + 0x30], ebx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea rsi, [0x00406790]
test eax, eax
jne 0x401fcf
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, str.HomeDirectory
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x401fc4
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401fcf
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0xf0]
lea rax, [rsp + 0xf0]
mov rdx, rbx
sub rsi, rcx
movzx ecx, byte [rsi + rax]
test cl, cl
je 0x401ff9
mov byte [rax], cl
inc rax
dec rdx
jne 0x401fe5
jmp 0x401ffe
test rdx, rdx
jne 0x402001
dec rax
mov rsi, qword [rsp + 0x230]
mov byte [rax], dil
mov rcx, rbx
lea rax, [rsp + 0xf0]
cmp byte [rax], dil
je 0x402026
inc rax
dec rcx
jne 0x402017
jmp 0x402067
test rcx, rcx
je 0x402067
mov rax, rbx
sub rax, rcx
sub rbx, rax
lea rcx, [rsp + rax + 0xf0]
je 0x402067
lea rdx, str.ApMsgFwd.exe
sub rdx, rcx
movzx eax, byte [rdx + rcx]
test al, al
je 0x40205c
mov byte [rcx], al
inc rcx
dec rbx
jne 0x402048
jmp 0x402061
test rbx, rbx
jne 0x402064
dec rcx
mov byte [rcx], dil
lea rcx, [rsp + 0xf0]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, ebp
jne 0x4020c3
xor ebx, ebx
nop
nop
cmp ebx, 0x46
jge 0x4020b5
lea r8, [0x004066e0]
xor edx, edx
mov ecx, 0xf001f
call qword [sym.imp.KERNEL32.dll_OpenFileMappingA]
test rax, rax
mov rdi, rax
jne 0x4020ac
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
test rdi, rdi
je 0x402080
jmp 0x4020ba
test rdi, rdi
je 0x4020c3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x220]
mov dword [0x00406780], ebp
lea r8, str.ApMsgFwd_File_Mapping_Object
xor edx, edx
mov ecx, 0xf001f
call qword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov rdi, qword [rsp + 0x238]
test rax, rax
mov rcx, rax
je 0x40211b
mov eax, dword [0x00406784]
bt eax, r12d
jae 0x40210f
mov eax, dword [0x00406650]
cmp dword [0x00406788], eax
jae 0x402111
xor ebp, ebp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebp
jmp 0x40211d
xor eax, eax
mov r12, qword [rsp + 0x210]
mov rbp, qword [rsp + 0x228]
mov rcx, qword [rsp + 0x200]
call fcn.00403180
add rsp, 0x218
ret