Function at 0x140011276
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
jmp 0x1400118a0
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rdi
sub rsp, 0x428
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x9a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x448]
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0x3d8], rax
lea rcx, [0x14002309f]
call fcn.140011389
nop
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rbp + 0x408]
cmp qword [rcx + rax], 0
je 0x140011ec7
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rbp + 0x408]
cmp qword [rcx + rax], 0
je 0x140011ec7
mov eax, 8
imul rax, rax, 2
mov rcx, qword [rbp + 0x408]
cmp qword [rcx + rax], 0
je 0x140011ec7
mov eax, 8
imul rax, rax, 3
mov rcx, qword [rbp + 0x408]
cmp qword [rcx + rax], 0
je 0x140011ec7
mov eax, 8
imul rax, rax, 2
mov rcx, qword [rbp + 0x408]
mov rax, qword [rcx + rax]
mov qword [rbp + 8], rax
mov eax, 8
imul rax, rax, 3
mov rcx, qword [rbp + 0x408]
mov rax, qword [rcx + rax]
mov qword [rbp + 0x28], rax
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rbp + 0x408]
mov rax, qword [rcx + rax]
mov qword [rbp + 0x48], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 0x68], rax
cmp qword [rbp + 0x68], 0xffffffffffffffff
je 0x140011ebc
xor edx, edx
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x84], eax
mov eax, dword [rbp + 0x84]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp + 0xa8], rax
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0xc4]
mov r8d, dword [rbp + 0x84]
mov rdx, qword [rbp + 0xa8]
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rbp + 0xe4], eax
cmp dword [rbp + 0xe4], 1
jne 0x140011eae
mov eax, dword [rbp + 0x84]
cmp dword [rbp + 0xc4], eax
jne 0x140011eae
mov rax, qword [rbp + 0xa8]
mov qword [rbp + 0x108], rax
mov rax, qword [rbp + 0x108]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x140011eae
mov rax, qword [rbp + 0x108]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0xa8]
lea rax, [rcx + rax + 4]
mov qword [rbp + 0x128], rax
mov rax, qword [rbp + 0x108]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0xa8]
lea rax, [rcx + rax + 0x18]
mov qword [rbp + 0x148], rax
mov rax, qword [rbp + 0x108]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0xa8]
lea rax, [rcx + rax + 0x108]
mov qword [rbp + 0x168], rax
mov rax, qword [rbp + 0x128]
movzx eax, word [rax + 2]
mov word [rbp + 0x184], ax
movzx eax, word [rbp + 0x184]
imul rax, rax, 0x28
mov rcx, qword [rbp + 0x168]
add rcx, rax
mov rax, rcx
mov r8d, 0x28
xor edx, edx
mov rcx, rax
call fcn.1400112cb
nop
movzx eax, word [rbp + 0x184]
imul rax, rax, 0x28
mov rcx, qword [rbp + 0x168]
add rcx, rax
mov rax, rcx
mov r8d, 8
mov rdx, qword [rbp + 0x48]
mov rcx, rax
call fcn.1400111b3
nop
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 0x1a8], rax
cmp qword [rbp + 0x1a8], 0xffffffffffffffff
je 0x140011ea0
xor edx, edx
mov rcx, qword [rbp + 0x1a8]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x1c4], eax
cmp dword [rbp + 0x1c4], 0
jbe 0x140011ea0
mov eax, dword [rbp + 0x1c4]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp + 0x1e8], rax
cmp qword [rbp + 0x1e8], 0
je 0x140011ea0
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x204]
mov r8d, dword [rbp + 0x1c4]
mov rdx, qword [rbp + 0x1e8]
mov rcx, qword [rbp + 0x1a8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rbp + 0x244], eax
cmp dword [rbp + 0x244], 1
jne 0x140011e92
mov eax, dword [rbp + 0x1c4]
cmp dword [rbp + 0x204], eax
jne 0x140011e92
movzx eax, word [rbp + 0x184]
imul rax, rax, 0x28
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov eax, dword [rdx + rax + 0x14]
mov rdx, qword [rbp + 0x168]
add eax, dword [rdx + rcx + 0x10]
xor r9d, r9d
xor r8d, r8d
mov edx, eax
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140011e92
xor r8d, r8d
mov rax, qword [rbp + 0x148]
mov edx, dword [rax + 0x20]
mov ecx, dword [rbp + 0x1c4]
call fcn.1400111f4
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov dword [rdx + rcx + 8], eax
movzx eax, word [rbp + 0x184]
dec eax
cdqe
imul rax, rax, 0x28
movzx ecx, word [rbp + 0x184]
dec ecx
movsxd rcx, ecx
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov r8d, dword [rdx + rax + 0xc]
mov rax, qword [rbp + 0x148]
mov edx, dword [rax + 0x20]
mov rax, qword [rbp + 0x168]
mov ecx, dword [rax + rcx + 8]
call fcn.1400111f4
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov dword [rdx + rcx + 0xc], eax
xor r8d, r8d
mov rax, qword [rbp + 0x148]
mov edx, dword [rax + 0x24]
mov ecx, dword [rbp + 0x1c4]
call fcn.1400111f4
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov dword [rdx + rcx + 0x10], eax
movzx eax, word [rbp + 0x184]
dec eax
cdqe
imul rax, rax, 0x28
movzx ecx, word [rbp + 0x184]
dec ecx
movsxd rcx, ecx
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov r8d, dword [rdx + rax + 0x14]
mov rax, qword [rbp + 0x148]
mov edx, dword [rax + 0x24]
mov rax, qword [rbp + 0x168]
mov ecx, dword [rax + rcx + 0x10]
call fcn.1400111f4
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov dword [rdx + rcx + 0x14], eax
movzx eax, word [rbp + 0x184]
imul rax, rax, 0x28
mov rcx, qword [rbp + 0x168]
mov dword [rcx + rax + 0x24], 0xe00000e0
movzx eax, word [rbp + 0x184]
imul rax, rax, 0x28
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov eax, dword [rdx + rax + 0x14]
mov rdx, qword [rbp + 0x168]
add eax, dword [rdx + rcx + 0x10]
xor r9d, r9d
xor r8d, r8d
mov edx, eax
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140011ddb
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
nop
movzx eax, word [rbp + 0x184]
imul rax, rax, 0x28
movzx ecx, word [rbp + 0x184]
imul rcx, rcx, 0x28
mov rdx, qword [rbp + 0x168]
mov eax, dword [rdx + rax + 0xc]
mov rdx, qword [rbp + 0x168]
add eax, dword [rdx + rcx + 8]
mov rcx, qword [rbp + 0x148]
mov dword [rcx + 0x38], eax
mov rax, qword [rbp + 0x128]
movzx eax, word [rax + 2]
inc eax
mov rcx, qword [rbp + 0x128]
mov word [rcx + 2], ax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140011e69
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0xc4]
mov r8d, dword [rbp + 0x84]
mov rdx, qword [rbp + 0xa8]
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x224]
mov r8d, dword [rbp + 0x1c4]
mov rdx, qword [rbp + 0x1e8]
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
mov rcx, qword [rbp + 0x1a8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rbp + 0xa8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
xor eax, eax
mov edi, eax
lea rcx, [rbp - 0x40]
lea rdx, [0x14001acb0]
call fcn.140011325
mov eax, edi
mov rcx, qword [rbp + 0x3d8]
xor rcx, rbp
call fcn.1400111ae
lea rsp, [rbp + 0x3e8]
pop rdi
pop rbp
ret