Function at 0x180001800
Capabilities:
Accept command line arguments
Allocate or change rwx memory
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x3c8
mov rax, qword [0x180018018]
xor rax, rsp
mov qword [rsp + 0x390], rax
mov qword [rsp + 0x30], rdx
mov rdi, rcx
mov qword [rsp + 0x28], rcx
lea rdx, [0x180019a90]
lea rcx, [rsp + 0x280]
xor esi, esi
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [rsi + 0x2e]
lea rcx, [rsp + 0x280]
call fcn.1800024c0
test rax, rax
je 0x180001b83
mov qword [rsp + 0x3f0], rbx
mov qword [rsp + 0x3b8], r12
lea rdx, [0x180013568]
lea rcx, [rsp + 0x280]
mov qword [rsp + 0x3b0], r13
mov byte [rax + 1], 0x64
mov qword [rsp + 0x3a0], r15
mov byte [rax + 2], 0x62
mov byte [rax + 3], sil
call fcn.180003574
mov rbx, rax
test rax, rax
je 0x180001b61
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 2]
call fcn.18000338c
mov rcx, rbx
call fcn.180003270
xor r8d, r8d
xor edx, edx
mov rcx, rbx
movsxd r12, eax
call fcn.18000338c
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
lea r11d, [r12 + 1]
lea r9d, [rcx + 0x40]
mov r8d, 0x3000
movsxd rdx, r11d
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
je 0x180001b61
cmp r12d, 0x1000
jle 0x180001b61
lea rdx, [rsp + 0x140]
lea rcx, [0x180013564]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rcx, rax
cmp rax, 0xffffffffffffffff
jne 0x180001930
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x180019bc4], eax
jmp 0x180001943
mov eax, dword [rsp + 0x160]
mov dword [0x180019bc4], eax
call qword [sym.imp.KERNEL32.dll_FindClose]
mov r9, rbx
mov r8d, 1
mov rdx, r12
mov rcx, r13
call fcn.18000308c
mov rcx, rbx
call fcn.180002cf8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rbx, r13
mov eax, esi
test r12d, r12d
jle 0x18000197f
nop
cmp byte [rbx], sil
jne 0x18000197f
inc eax
inc rbx
cmp eax, r12d
jl 0x180001970
mov eax, dword [0x180019bc0]
test al, 1
jne 0x1800019b2
mov edx, 1
or eax, 1
lea r9, [0x180013560]
mov r8d, edx
xor ecx, ecx
mov dword [0x180019bc0], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x180019bb8], rax
jmp 0x1800019b9
mov rax, qword [0x180019bb8]
test rax, rax
jne 0x1800019ca
mov dword [0x180019bb0], 0xffffffff
jmp 0x1800019e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
cmp eax, 0xb7
setne cl
mov dword [0x180019bb0], ecx
mov rax, rbx
sub rax, r13
add rax, 0x1000
cmp rax, r12
jl 0x180001a19
mov r8, r12
xor edx, edx
mov rcx, r13
mov qword [rdi], rsi
call fcn.180002b80
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x180001b63
lea rcx, [rsp + 0x40]
mov r8d, 0x10
mov rdx, rbx
mov qword [rsp + 0x3c0], rbp
mov qword [rsp + 0x3a8], r14
call fcn.180001390
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov r14, rax
test rax, rax
je 0x180001a9a
cmp dword [rsp + 0x20], esi
mov edi, esi
jle 0x180001a91
mov rbp, rax
mov rcx, qword [rbp]
lea rdx, [0x180013558]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ecx, dword [0x180019bac]
test eax, eax
cmovne ecx, edi
inc edi
add rbp, 8
cmp edi, dword [rsp + 0x20]
mov dword [0x180019bac], ecx
jl 0x180001a63
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdi, [rbx + 0x10]
mov ebp, r13d
lea rcx, [rsp + 0x40]
sub ebp, ebx
mov r9, rdi
mov rdx, rdi
lea r8d, [rbp + r12 - 0x10]
call fcn.180001610
cmp byte [rdi], 0x53
mov r14, qword [rsp + 0x3a8]
jne 0x180001b33
cmp byte [rbx + 0x11], 0x55
jne 0x180001b33
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x9c
call fcn.180002b80
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x9c
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x180001b18
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [0x180019ba8]
test eax, eax
cmove ecx, esi
mov dword [0x180019ba8], ecx
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
mov esi, 1
mov qword [rax], rdi
lea eax, [rbp + r12 - 0x10]
mov dword [rcx], eax
jmp 0x180001b59
mov rax, qword [rsp + 0x28]
mov r8, r12
xor edx, edx
mov rcx, r13
mov qword [rax], rsi
call fcn.180002b80
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbp, qword [rsp + 0x3c0]
mov eax, esi
mov r12, qword [rsp + 0x3b8]
mov r13, qword [rsp + 0x3b0]
mov rbx, qword [rsp + 0x3f0]
mov r15, qword [rsp + 0x3a0]
mov rcx, qword [rsp + 0x390]
xor rcx, rsp
call fcn.180002890
add rsp, 0x3c8
pop rdi
pop rsi
ret