Function at 0x405248
Capabilities:
Accept command line arguments
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r13, rcx
call fcn.00404d48
xor r15d, r15d
mov rdi, rax
cmp rax, r15
je 0x4055c4
lea edx, [r15 + 0x20]
mov rcx, rax
call qword [0x00407038]
cmp rax, r15
jne 0x4052a9
xor edx, edx
mov rcx, rdi
call qword [0x00407038]
cmp rax, r15
jne 0x4052a9
lea rdx, [0x00401250]
jmp 0x4055b4
sub rax, rdi
sar rax, 1
cmp rax, 2
jae 0x4052d4
lea rdx, [0x00401268]
lea rcx, [0x00407060]
or r8d, 0xffffffff
call fcn.00405fd0
mov rdx, rdi
jmp 0x4055b4
lea rsi, [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rsi + 2]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
cmp rax, r15
jne 0x405301
lea rdx, [0x00401280]
jmp 0x4055b4
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call qword [0x00407020]
xor edx, edx
mov r8, r12
lea ecx, [rdx + 4]
mov word [rsi + r12], r15w
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov r14, rax
cmp rax, r15
jne 0x405361
lea rdx, [0x00401298]
lea rcx, [0x00407060]
or r8d, 0xffffffff
call fcn.00405fd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x00407060]
mov edx, eax
mov r8d, 0xa
call fcn.00405f20
jmp 0x4055c4
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbp, rax
cmp rax, r15
jne 0x40538a
lea rdx, [0x004012b0]
jmp 0x405332
mov r8d, 0x20
mov rdx, rax
mov rcx, r13
call qword [0x00407020]
call fcn.00404c98
mov rsi, rax
cmp rax, r15
je 0x4055c4
movsxd rdi, dword [rbp + 0x20]
mov qword [rsp + 0x68], rdi
cmp dword [r13 + 0x18], r15d
je 0x4053d1
lea rdx, [r13 + 0x18]
mov rcx, rax
call fcn.00404bf8
cmp al, r15b
je 0x4055c4
cmp edi, r15d
je 0x4053ec
lea rdx, [rsp + 0x68]
mov rcx, rsi
call fcn.00404bf8
cmp al, r15b
je 0x4055c4
movsxd rcx, dword [r13 + 0x18]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
cmp rax, r15
jne 0x405419
lea rdx, [0x004012c8]
jmp 0x405332
cmp dword [rax + 0x50], r15d
je 0x4055ad
cmp dword [rax + 0x54], r15d
je 0x4055ad
mov eax, dword [rax + 0x40]
cmp eax, r15d
je 0x4055ad
cmp dword [rdi + 0x44], r15d
je 0x4055ad
lea ebx, [rax + 1]
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r13, rax
cmp rax, r15
jne 0x405471
lea rdx, [0x004012f8]
jmp 0x4055b4
mov r8d, dword [rdi + 0x40]
mov edx, dword [rdi + 0x44]
mov rcx, rax
add r8, r8
add rdx, rdi
call qword [0x00407020]
mov r11d, dword [rdi + 0x40]
mov word [r13 + r11*2], r15w
mov ebx, dword [rdi + 0x50]
inc ebx
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ebx, ebx
mov r15, rax
cmp rax, rbx
jne 0x4054c3
lea rdx, [0x00401310]
jmp 0x4055b4
mov r8d, dword [rdi + 0x50]
mov edx, dword [rdi + 0x54]
mov rcx, rax
add r8, r8
add rdx, rdi
call qword [0x00407020]
mov r11d, dword [rdi + 0x50]
mov word [r15 + r11*2], bx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, r15
mov rcx, rax
call qword [0x00407040]
mov r11, qword gs:[0x30]
mov rdx, r13
mov rax, qword [r11 + 0x60]
mov rbx, qword [rax + 0x20]
lea rcx, [rbx + 0x60]
call qword [0x00407008]
lea rcx, [rbx + 0x70]
mov rdx, r15
call qword [0x00407008]
mov eax, dword [rbp + 0x24]
lea rbx, [rbp + 0x28]
lea r13, [rbx + rax*4]
cmp rbx, r13
je 0x40554b
mov edx, dword [rbx]
add rdx, rdi
cmp dword [rdx], 0
je 0x405545
mov rcx, rsi
call fcn.00404bf8
test al, al
je 0x4055c4
add rbx, 4
jmp 0x40552a
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x405566
lea rdx, [0x00401328]
jmp 0x405332
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x4055c6
lea rdx, [0x004012e0]
lea rcx, [0x00407060]
or r8d, 0xffffffff
call fcn.00405fd0
xor al, al
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret