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

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x2b0
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x2a0], rbx
mov qword [rbp + 0x2a8], rsi
mov qword [rbp + 0x2b0], rdi
mov rax, qword [0x18012d040]
xor rax, rbp
mov qword [rbp + 0x260], rax
mov rcx, qword [0x18012e038]
mov rax, qword [0x18012e040]
mov rdx, qword [rax + rcx*8]
lea rax, [rbp + 0x50]
movzx ecx, word [0x18012f480]
test cx, cx
je 0x18004f640
lea rdi, [0x18012f480]
lea rsi, [rbp + 0x50]
sub rdi, rsi
nop dword [rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdi + rax]
test cx, cx
jne 0x18004f630
xor r15d, r15d
mov word [rax], r15w
movzx ecx, word [rdx]
test cx, cx
je 0x18004f670
sub rdx, rax
nop dword [rax]
nop word [rax + rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x18004f660
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x50]
mov edx, 0xc0000000
mov word [rax], r15w
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x18004f6c7
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x18004f7f6
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movabs rax, 0x6ca7833c0b1d8433
movabs rcx, 0x920f5d30473f0e32
mov qword [rbp], rax
movabs rdi, 0x6e891a7c8654f826
mov rax, qword [rbp]
movabs rdx, 0x1887e7596774e555
movabs rax, 0xf12f395128532e5d
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xe8864044d17e39e8
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xc9e03ffa4f6902d8
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x573743a5385cb99c
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
movabs rax, 0x89f43523b8185787
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xa58959da21066bac
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x573743a51a7c83f9
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rdi
mov rax, qword [rbp]
movabs rax, 0x1887e7596774e577
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
xor al, al
mov rcx, qword [rbp + 0x260]
xor rcx, rbp
call fcn.1800c4b70
mov rbx, qword [rbp + 0x2a0]
mov rsi, qword [rbp + 0x2a8]
mov rdi, qword [rbp + 0x2b0]
lea rsp, [rbp + 0x270]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov qword [rbp + 0x10], rdi
mov rcx, rax
xor edx, edx
mov rsi, rdi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r9d, r9d
mov qword [rsp + 0x20], r15
mov rdx, rax
mov qword [rbp], rax
mov r8d, edi
mov rcx, r13
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18004f85e
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x18004f6c7
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18004f6c7
movabs rax, 0xbb62c62c9808ea37
mov dword [rbp + 0x18], 0x3e8
movabs r14, 0x2b9fff192bd4c83e
mov qword [rbp + 0x30], rax
lea rdx, [rbp + 0x18]
mov qword [rbp + 0x38], r14
lea rcx, [rbp + 0x30]
mov qword [rbp + 0x40], 4
mov qword [rbp + 0x48], r15
call fcn.18004dc10
mov rax, qword [rbx]
lea rdx, [rbx + 8]
mov qword [rbp + 0x30], rax
movabs rdi, 0x8cb0c9a388179fe5
mov rcx, qword [rdx]
movabs rax, 0x26efb703382e92fd
add rdx, 8
mov qword [rbp + 0x38], rcx
movabs r10, 0x889f8b4975721ba3
movabs r8, 0x566c1c811e86d8fd
movabs r9, 0x8012fbb270cb163d
movabs r11, 0xa00a62a942b20165
movabs r12, 0xbaaedcff023465cb
cmp rcx, rdi
ja 0x18004f930
je 0x18004fb4c
cmp rcx, rax
je 0x18004fb50
cmp rcx, r14
je 0x18004fb50
cmp rcx, r8
je 0x18004fb4c
cmp rcx, r9
je 0x18004fb4c
cmp rcx, r10
je 0x18004fb50
jmp 0x18004f97b
cmp rcx, r11
je 0x18004fb50
cmp rcx, r12
je 0x18004fb50
movabs rax, 0xbf1d25349b935bb7
cmp rcx, rax
je 0x18004fb4c
movabs rax, 0xcd2fd49bc6b014bd
cmp rcx, rax
je 0x18004fb50
movabs rax, 0xfb0ce58f438fe2a6
cmp rcx, rax
je 0x18004fb4c
cmp qword [rbp + 0x40], 8
lea r10, [rbp + 0x48]
mov rax, qword [0x18012e058]
mov rdi, qword [0x18012e060]
cmova r10, qword [rbp + 0x48]
cmp rax, rdi
je 0x18004fa25
cmp qword [rax], rcx
je 0x18004f9b0
add rax, 0x20
cmp rax, rdi
jne 0x18004f9a0
jmp 0x18004fa25
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x18004fa25
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x18004fa21
cmp rcx, qword [r8 + 8]
jne 0x18004fa21
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x18004fa04
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18004fa14
cmp rax, 2
jne 0x18004fa12
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18004fa14
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x18004f9d0
mov rsi, qword [rbp + 0x10]
movabs rdi, 0x8cb0c9a388179fe5
mov r14, qword [0x18012e078]
mov r12, qword [0x18012e070]
mov qword [rbp + 8], r14
cmp r12, r14
je 0x18004ff93
nop word [rax + rax]
mov rax, qword [r12]
lea r8, [rbp + 0x20]
mov qword [rbp + 0x20], rax
mov r9d, 0x10
mov rax, qword [r12 + 8]
mov rdx, rsi
mov rcx, rbx
mov qword [rbp + 0x28], rax
mov qword [rsp + 0x20], r15
call fcn.180062510
mov rdx, rax
test rax, rax
jne 0x18004fde0
cmp qword [rbp + 0x40], 8
lea rax, [rbp + 0x48]
cmova rax, qword [rbp + 0x48]
cmp dword [rax], 0x3e8
jge 0x18004ff78
lea r9d, [rdx + 2]
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18004ff78
mov rcx, r12
call fcn.18004dcd0
add rax, 0x10
mov rdx, r15
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
test rdx, rdx
je 0x18004fb8c
mov rcx, r12
call fcn.18004dcd0
add rax, 0x10
mov rdx, r15
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
mov rcx, r12
cmp rdx, 0x400
ja 0x18004fb5e
call fcn.18004dcd0
add rax, 0x10
mov rdx, r15
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
lea rax, [rdx + 0xf]
cmp rax, rdx
ja 0x18004fb2d
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.1800c53c0
sub rsp, rax
lea r15, [rsp + 0x40]
test r15, r15
je 0x18004fb8c
mov dword [r15], 0xcccc
jmp 0x18004fb88
add rdx, 8
lea rcx, [rbp + 0x30]
call fcn.18004dc10
jmp 0x18004fa2f
call fcn.18004dcd0
add rax, 0x10
mov rcx, r15
lea rdx, [rax + 0x10]
cmp rdx, rax
cmova rcx, rdx
call fcn.1800d17c8
mov r15, rax
test rax, rax
je 0x18004fb8c
mov dword [rax], 0xdddd
add r15, 0x10
mov rax, qword [r12]
lea rbx, [r15 + 8]
mov qword [r15], rax
mov rax, qword [r12 + 8]
mov qword [rbx], rax
add rbx, 8
mov rax, qword [r12 + 8]
cmp rax, rdi
ja 0x18004fc14
je 0x18004fd84
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x18004fd90
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x18004fd90
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x18004fd84
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x18004fd84
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
je 0x18004fd90
jmp 0x18004fc73
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x18004fd90
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x18004fd90
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x18004fd84
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x18004fd90
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18004fd84
cmp qword [r12 + 0x10], 8
lea r14, [r12 + 0x18]
jbe 0x18004fc83
mov r14, qword [r14]
mov rdi, qword [0x18012e058]
mov rcx, qword [0x18012e060]
cmp rdi, rcx
je 0x18004fca4
cmp qword [rdi], rax
je 0x18004fd12
add rdi, 0x20
cmp rdi, rcx
jne 0x18004fc96
mov r14, qword [rbp + 8]
sub rbx, r15
mov qword [rsp + 0x20], 0
mov r8d, ebx
xor r9d, r9d
mov rdx, r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r9d, r9d
xor r8d, r8d
mov rcx, r13
lea edx, [r9 + 0x10]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18004ff71
lea rcx, [rbp + 0x30]
mov dword [rbp + 0x1c], 0x3e8
call fcn.18004dcd0
xor r15d, r15d
lea rdx, [rbp + 0x1c]
mov r8, rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x18004ff74
mov rcx, r12
call fcn.18004dcd0
mov qword [rbx], rax
add rbx, 8
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r8
je 0x18004fca4
mov rax, qword [rdx]
mov qword [rbx], rax
mov rax, qword [rdx + 8]
mov qword [rbx + 8], rax
add rbx, 0x10
mov rcx, qword [rdx + 0x10]
mov rdi, rbx
mov rsi, qword [rdx + 0x18]
mov rax, rcx
add rsi, r14
and eax, 3
jne 0x18004fd62
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18004fd72
cmp rax, 2
jne 0x18004fd70
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18004fd72
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x18004fd32
jmp 0x18004fca4
mov rax, qword [r12 + 0x10]
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [r12 + 0x10]
lea rsi, [r12 + 0x18]
cmp rcx, 8
jbe 0x18004fda3
mov rsi, qword [rsi]
mov rax, rcx
mov rdi, rbx
and eax, 3
jne 0x18004fdca
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [r12 + 0x10]
jmp 0x18004fca8
rep movsb byte [rdi], byte [rsi]
add rbx, qword [r12 + 0x10]
jmp 0x18004fca8
cmp rax, 2
jne 0x18004fdbe
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [r12 + 0x10]
jmp 0x18004fca8
mov rax, qword [rax]
mov qword [r12], rax
mov rcx, qword [rdx + 8]
add rdx, 0x10
mov qword [r12 + 8], rcx
cmp rcx, rdi
ja 0x18004fe60
je 0x18004ff63
movabs rax, 0x26efb703382e92fd
cmp rcx, rax
je 0x18004ff67
movabs rax, 0x2b9fff192bd4c83e
cmp rcx, rax
je 0x18004ff67
movabs rax, 0x566c1c811e86d8fd
cmp rcx, rax
je 0x18004ff63
movabs rax, 0x8012fbb270cb163d
cmp rcx, rax
je 0x18004ff63
movabs rax, 0x889f8b4975721ba3
cmp rcx, rax
je 0x18004ff67
jmp 0x18004febf
movabs rax, 0xa00a62a942b20165
cmp rcx, rax
je 0x18004ff67
movabs rax, 0xbaaedcff023465cb
cmp rcx, rax
je 0x18004ff67
movabs rax, 0xbf1d25349b935bb7
cmp rcx, rax
je 0x18004ff63
movabs rax, 0xcd2fd49bc6b014bd
cmp rcx, rax
je 0x18004ff67
movabs rax, 0xfb0ce58f438fe2a6
cmp rcx, rax
je 0x18004ff63
cmp qword [r12 + 0x10], 8
lea r10, [r12 + 0x18]
jbe 0x18004fecf
mov r10, qword [r10]
mov rax, qword [0x18012e058]
mov rdi, qword [0x18012e060]
cmp rax, rdi
je 0x18004ff78
cmp qword [rax], rcx
je 0x18004fef9
add rax, 0x20
cmp rax, rdi
jne 0x18004fee6
jmp 0x18004ff78
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x18004ff78
nop word [rax + rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x18004ff78
cmp rcx, qword [r8 + 8]
jne 0x18004ff78
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x18004ff44
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18004ff54
cmp rax, 2
jne 0x18004ff52
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18004ff54
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x18004ff10
jmp 0x18004ff78
add rdx, 8
mov rcx, r12
call fcn.18004dc10
jmp 0x18004ff78
xor r15d, r15d
mov rbx, qword [rbp]
mov rsi, qword [rbp + 0x10]
add r12, 0x20
movabs rdi, 0x8cb0c9a388179fe5
cmp r12, r14
jne 0x18004fa50
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, [rbp + 0x30]
call fcn.18004b7a0
movabs rcx, 0x920f5d30473f0e32
movabs rax, 0x7ba7833c03158a39
mov qword [rbp], rax
movabs rdx, 0x1887e7596774e555
mov rax, qword [rbp]
movabs rax, 0xf37d28572e59605d
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xe59d5303d6773ef3
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xa58959da032651c9
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
movabs rax, 0x89f43523b8185787
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xa58959da21066bac
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x1887e7596774e577
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
mov al, 1
jmp 0x18004f7c1