Function at 0x180055720
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, 0x380
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x370], rbx
mov qword [rbp + 0x378], rsi
mov qword [rbp + 0x380], rdi
mov rax, qword [0x180175010]
xor rax, rbp
mov qword [rbp + 0x330], rax
mov rcx, qword [0x180175fd0]
mov rax, qword [0x180175fd8]
mov r14, qword [rax + rcx*8]
lea rax, [rbp + 0x120]
movzx ecx, word [0x180177490]
mov qword [rbp], r14
test cx, cx
je 0x1800557b0
lea rdx, [0x180177490]
lea rdi, [rbp + 0x120]
sub rdx, rdi
nop word [rax + rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x1800557a0
xor r15d, r15d
mov word [rax], r15w
movzx ecx, word [r14]
test cx, cx
je 0x1800557e0
mov rdx, r14
sub rdx, rax
nop word [rax + rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x1800557d0
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x120]
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 0x18005583a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x180055ac4
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dl, 2
call fcn.180071aa0
mov rbx, rax
lea r8, [rbp + 0xa0]
movabs rax, 0x3b1121906424e063
movabs rsi, 0x4f3145f5084d8105
mov qword [rbp], rax
movabs rdi, 0x6fda61f061f8fbc2
mov rcx, qword [rbp]
movabs rax, 0xcfa05910e94dbad
mov qword [rbp + 0xa0], rcx
mov edx, r8d
mov qword [rbp], rax
movabs rax, 0x18442580571240a8
mov rcx, qword [rbp]
mov qword [rbp + 0xa8], rcx
mov qword [rbp], rax
movabs rax, 0x28a5a26adea90178
mov rcx, qword [rbp]
mov qword [rbp + 0xb0], rcx
movabs rcx, 0x7fb1dc8c816ad206
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0xb8], rax
movabs rax, 0x165d7d01bd07efac
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0xc0], rax
mov qword [rbp], rcx
mov rax, qword [rbp]
mov qword [rbp + 0xc8], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0xf0], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0xf8], rax
movabs rax, 0x793650e73e742ec7
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x100], rax
movabs rax, 0x44ccc44ab0c6680c
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x108], rax
movabs rax, 0x165d7d019f27d5c9
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x110], rax
mov qword [rbp], rcx
lea rcx, [rbp + 0xa0]
mov rax, qword [rbp]
movdqa xmm2, xmmword [rbp + 0xa0]
pxor xmm2, xmmword [rbp + 0xf0]
movdqa xmm0, xmmword [rbp + 0xb0]
movdqa xmm1, xmmword [rbp + 0xc0]
pxor xmm0, xmmword [rbp + 0x100]
mov qword [rbp + 0x118], rax
movq rax, xmm2
pxor xmm1, xmmword [rbp + 0x110]
movdqa xmmword [rbp + 0xa0], xmm2
movdqa xmmword [rbp + 0xb0], xmm0
movdqa xmmword [rbp + 0xc0], xmm1
test al, al
je 0x1800559db
nop dword [rax + rax]
inc rcx
mov rdx, rcx
cmp byte [rcx], r15b
jne 0x1800559d0
mov rcx, qword [0x180175e68]
sub edx, r8d
mov r8d, edx
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0xa0]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r14
mov rcx, rbx
call fcn.180071c10
movabs rax, 0x4f3145f5084d8127
lea rcx, [rbp + 0x40]
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x40], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0x48], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0x10], rax
mov qword [rbp], rdi
lea rdi, [rbp + 0x40]
mov rax, qword [rbp]
mov edx, edi
movdqa xmm0, xmmword [rbp + 0x40]
mov qword [rbp + 0x18], rax
pxor xmm0, xmmword [rbp + 0x10]
movq rax, xmm0
movdqa xmmword [rbp + 0x40], xmm0
test al, al
je 0x180055a6f
inc rcx
mov rdx, rcx
cmp byte [rcx], r15b
jne 0x180055a64
mov rcx, qword [0x180175e68]
sub edx, edi
mov r8d, edx
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x40]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor al, al
mov rcx, qword [rbp + 0x330]
xor rcx, rbp
call fcn.1800d6d50
mov rbx, qword [rbp + 0x370]
mov rsi, qword [rbp + 0x378]
mov rdi, qword [rbp + 0x380]
lea rsp, [rbp + 0x340]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov qword [rbp + 0x40], 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 + 0x50], rax
mov r8d, edi
mov rcx, r13
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180055b2c
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x18005583a
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18005583a
movabs rax, 0xbb62c62c9808ea37
mov dword [rbp + 0x20], 0x3e8
movabs r15, 0x2b9fff192bd4c83e
mov qword [rbp + 0x60], rax
xor edi, edi
mov qword [rbp + 0x68], r15
lea rdx, [rbp + 0x20]
mov qword [rbp + 0x78], rdi
lea rcx, [rbp + 0x60]
mov qword [rbp + 0x70], 4
call fcn.180053590
mov rax, qword [rbx]
lea rdx, [rbx + 8]
mov qword [rbp + 0x60], rax
movabs r12, 0x889f8b4975721ba3
mov rcx, qword [rdx]
movabs rax, 0x8cb0c9a388179fe5
add rdx, 8
mov qword [rbp + 0x68], rcx
movabs r8, 0xfb0ce58f438fe2a6
movabs r10, 0x566c1c811e86d8fd
movabs r11, 0x8012fbb270cb163d
movabs r9, 0x26efb703382e92fd
cmp rcx, rax
ja 0x180055bf6
je 0x180055e17
cmp rcx, r9
je 0x180055e1b
cmp rcx, r15
je 0x180055e1b
cmp rcx, r10
je 0x180055e17
cmp rcx, r11
je 0x180055e17
cmp rcx, r12
je 0x180055e1b
jmp 0x180055c4b
movabs rax, 0xa00a62a942b20165
cmp rcx, rax
je 0x180055e1b
movabs rax, 0xbaaedcff023465cb
cmp rcx, rax
je 0x180055e1b
movabs rax, 0xbf1d25349b935bb7
cmp rcx, rax
je 0x180055e17
movabs rax, 0xcd2fd49bc6b014bd
cmp rcx, rax
je 0x180055e1b
cmp rcx, r8
je 0x180055e17
cmp qword [rbp + 0x70], 8
lea r10, [rbp + 0x78]
mov rax, qword [0x180175ff0]
mov rdi, qword [0x180175ff8]
cmova r10, qword [rbp + 0x78]
cmp rax, rdi
je 0x180055cf5
cmp qword [rax], rcx
je 0x180055c80
add rax, 0x20
cmp rax, rdi
jne 0x180055c70
jmp 0x180055cf5
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x180055cf5
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x180055cf1
cmp rcx, qword [r8 + 8]
jne 0x180055cf1
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x180055cd4
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x180055ce4
cmp rax, 2
jne 0x180055ce2
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x180055ce4
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x180055ca0
mov rsi, qword [rbp + 0x40]
xor edi, edi
mov r12, qword [0x180176010]
mov r15, qword [0x180176008]
mov qword [rbp + 0x10], r12
cmp r15, r12
je 0x1800561ed
movabs r14, 0xffffffffffffff0
nop dword [rax]
mov rax, qword [r15]
lea r8, [rbp + 0x28]
mov qword [rbp + 0x28], rax
mov r9d, 0x10
mov rax, qword [r15 + 8]
mov rdx, rsi
mov rcx, rbx
mov qword [rbp + 0x30], rax
mov qword [rsp + 0x20], rdi
call fcn.180074250
mov rdx, rax
test rax, rax
jne 0x1800560b8
cmp qword [rbp + 0x70], 8
lea rax, [rbp + 0x78]
cmova rax, qword [rbp + 0x78]
cmp dword [rax], 0x3e8
jge 0x1800561d8
lea r9d, [rdx + 2]
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1800561d8
mov rcx, r15
call fcn.180053650
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
test rdx, rdx
je 0x180055e59
mov rcx, r15
call fcn.180053650
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
mov rcx, r15
cmp rdx, 0x400
ja 0x180055e29
call fcn.180053650
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
lea rax, [rdx + 0xf]
cmp rax, rdx
ja 0x180055df4
mov rax, r14
and rax, 0xfffffffffffffff0
call fcn.1800d7820
sub rsp, rax
lea r14, [rsp + 0x40]
test r14, r14
je 0x180055e5c
mov dword [r14], 0xcccc
add r14, 0x10
jmp 0x180055e5c
add rdx, 8
lea rcx, [rbp + 0x60]
call fcn.180053590
jmp 0x180055cf7
call fcn.180053650
add rax, 0x10
mov rcx, rdi
lea rdx, [rax + 0x10]
cmp rdx, rax
cmova rcx, rdx
call fcn.1800e360c
mov r14, rax
test rax, rax
je 0x180055e5c
mov dword [rax], 0xdddd
add r14, 0x10
jmp 0x180055e5c
mov r14, rdi
mov rax, qword [r15]
lea rbx, [r14 + 0x10]
mov qword [r14], rax
movabs rcx, 0x8cb0c9a388179fe5
mov rax, qword [r15 + 8]
mov qword [r14 + 8], rax
mov rax, qword [r15 + 8]
cmp rax, rcx
ja 0x180055ee8
je 0x180056062
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x18005606d
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x18005606d
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x180056062
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x180056062
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
je 0x18005606d
jmp 0x180055f47
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x18005606d
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x18005606d
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x180056062
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x18005606d
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x180056062
cmp qword [r15 + 0x10], 8
lea r12, [r15 + 0x18]
jbe 0x180055f56
mov r12, qword [r12]
mov rdi, qword [0x180175ff0]
mov rcx, qword [0x180175ff8]
cmp rdi, rcx
je 0x180055f7e
nop dword [rax]
cmp qword [rdi], rax
je 0x180055ff0
add rdi, 0x20
cmp rdi, rcx
jne 0x180055f70
mov r12, qword [rbp + 0x10]
sub ebx, r14d
xor edi, edi
mov r8d, ebx
mov qword [rsp + 0x20], rdi
xor r9d, r9d
mov rdx, r14
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r9d, r9d
lea edx, [rdi + 0x10]
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x180055fdd
lea rcx, [rbp + 0x60]
mov dword [rbp + 0x24], 0x3e8
call fcn.180053650
mov r8, rax
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea rdx, [rbp + 0x24]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rbp + 0x50]
movabs r14, 0xffffffffffffff0
jmp 0x1800561d8
mov rcx, r15
call fcn.180053650
mov qword [rbx], rax
add rbx, 8
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r8
je 0x180055f7e
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, r12
and eax, 3
jne 0x180056040
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x180056050
cmp rax, 2
jne 0x18005604e
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x180056050
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x180056010
jmp 0x180055f7e
mov rax, qword [r15 + 0x10]
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [r15 + 0x10]
lea rsi, [r15 + 0x18]
cmp rcx, 8
jbe 0x18005607e
mov rsi, qword [rsi]
mov rax, rcx
mov rdi, rbx
and eax, 3
jne 0x1800560a3
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [r15 + 0x10]
jmp 0x180055f82
rep movsb byte [rdi], byte [rsi]
add rbx, qword [r15 + 0x10]
jmp 0x180055f82
cmp rax, 2
jne 0x180056098
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [r15 + 0x10]
jmp 0x180055f82
mov rax, qword [rax]
movabs rcx, 0x8cb0c9a388179fe5
mov qword [r15], rax
mov rax, qword [rdx + 8]
add rdx, 0x10
mov qword [r15 + 8], rax
cmp rax, rcx
ja 0x180056140
je 0x18005647e
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x180056482
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x180056482
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x18005647e
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x18005647e
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
je 0x180056482
jmp 0x18005619f
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x180056482
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x180056482
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x18005647e
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x180056482
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18005647e
cmp qword [r15 + 0x10], 8
lea r10, [r15 + 0x18]
jbe 0x1800561ad
mov r10, qword [r10]
mov rax, qword [0x180175ff0]
mov rcx, qword [0x180175ff8]
cmp rax, rcx
je 0x1800561d8
mov rdi, qword [r15 + 8]
cmp qword [rax], rdi
je 0x180056400
add rax, 0x20
cmp rax, rcx
jne 0x1800561c4
xor edi, edi
mov rsi, qword [rbp + 0x40]
add r15, 0x20
cmp r15, r12
jne 0x180055d20
mov r14, qword [rbp]
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 + 0x60]
call fcn.18004f450
mov dl, 1
call fcn.180071aa0
mov rbx, rax
lea r8, [rbp + 0x80]
movabs rax, 0x2c1121906c2cee69
movabs rsi, 0x4f3145f5084d8105
mov qword [rbp], rax
movabs rdi, 0x6fda61f061f8fbc2
mov rcx, qword [rbp]
movabs rax, 0xea81497089e95ad
mov qword [rbp + 0x80], rcx
mov edx, r8d
mov qword [rbp], rax
movabs rax, 0x155f36c7501b47b3
mov rcx, qword [rbp]
mov qword [rbp + 0x88], rcx
mov qword [rbp], rax
movabs rax, 0x44ccc44a92e65269
mov rcx, qword [rbp]
mov qword [rbp + 0x90], rcx
lea rcx, [rbp + 0x80]
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x98], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0xd0], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0xd8], rax
movabs rax, 0x793650e73e742ec7
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0xe0], rax
movabs rax, 0x44ccc44ab0c6680c
mov qword [rbp], rax
mov rax, qword [rbp]
movdqa xmm1, xmmword [rbp + 0x80]
pxor xmm1, xmmword [rbp + 0xd0]
movdqa xmm0, xmmword [rbp + 0x90]
mov qword [rbp + 0xe8], rax
movq rax, xmm1
pxor xmm0, xmmword [rbp + 0xe0]
movdqa xmmword [rbp + 0x80], xmm1
movdqa xmmword [rbp + 0x90], xmm0
test al, al
je 0x18005633b
nop
inc rcx
mov rdx, rcx
cmp byte [rcx], 0
jne 0x180056330
mov rcx, qword [0x180175e68]
sub edx, r8d
mov r8d, edx
xor r15d, r15d
lea rdx, [rbp + 0x80]
mov qword [rsp + 0x20], r15
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r14
mov rcx, rbx
call fcn.180071c10
movabs rax, 0x4f3145f5084d8127
lea rcx, [rbp + 0x50]
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x50], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0x58], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0x10], rax
mov qword [rbp], rdi
lea rdi, [rbp + 0x50]
mov rax, qword [rbp]
mov edx, edi
movdqa xmm0, xmmword [rbp + 0x50]
mov qword [rbp + 0x18], rax
pxor xmm0, xmmword [rbp + 0x10]
movq rax, xmm0
movdqa xmmword [rbp + 0x50], xmm0
test al, al
je 0x1800563db
nop word [rax + rax]
inc rcx
mov rdx, rcx
cmp byte [rcx], r15b
jne 0x1800563d0
mov rcx, qword [0x180175e68]
sub edx, edi
mov r8d, edx
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x50]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov al, 1
jmp 0x180055a8f
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x1800561d6
nop word [rax + rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x1800561d6
cmp rcx, qword [r8 + 8]
jne 0x1800561d6
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x18005645c
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18005646c
cmp rax, 2
jne 0x18005646a
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18005646c
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x180056420
jmp 0x1800561d6
add rdx, 8
mov rcx, r15
call fcn.180053590
jmp 0x1800561d8