Function at 0x180056970
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, 0x310
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x300], rbx
mov qword [rbp + 0x308], rsi
mov qword [rbp + 0x310], rdi
mov rax, qword [0x180177040]
xor rax, rbp
mov qword [rbp + 0x2c0], rax
mov rcx, qword [0x180178040]
mov rax, qword [0x180178048]
mov r14, qword [rax + rcx*8]
lea rax, [rbp + 0xb0]
movzx ecx, word [0x1801794e0]
mov qword [rbp], r14
test cx, cx
je 0x180056a00
lea rdx, [0x1801794e0]
lea rdi, [rbp + 0xb0]
sub rdx, rdi
nop word [rax + rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x1800569f0
xor r15d, r15d
mov word [rax], r15w
movzx ecx, word [r14]
test cx, cx
je 0x180056a30
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 0x180056a20
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0xb0]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
mov r8d, 1
mov word [rax], r15w
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x180056a8c
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x180056cee
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dl, 2
call fcn.180073ee0
mov rbx, rax
lea rdx, [rbp + 0x30]
movabs rax, 0xb91c8df19be5267d
movabs rsi, 0xcd3ce994f78c471b
mov qword [rbp], rax
movabs rdi, 0xab0233a545d5cf34
mov rcx, qword [rbp]
movabs rax, 0xc82257c42ab9ef5b
mov qword [rbp + 0x30], rcx
mov r8d, edx
mov qword [rbp], rax
movabs rax, 0x1de74f3134af11ba
mov rcx, qword [rbp]
mov qword [rbp + 0x38], rcx
mov qword [rbp], rax
movabs rax, 0x40b4ec8706efaf02
mov rcx, qword [rbp]
mov qword [rbp + 0x40], rcx
movabs rcx, 0xe268d6816a28a468
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x48], rax
movabs rax, 0x6b0ae600c16c32aa
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x50], rax
mov qword [rbp], rcx
mov rax, qword [rbp]
mov qword [rbp + 0x58], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0x80], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0x88], rax
movabs rax, 0x7c953a565dc97fd5
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x90], rax
movabs rax, 0x2cdd8aa76880c676
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x98], rax
movabs rax, 0x6b0ae600e34c08cf
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0xa0], rax
mov qword [rbp], rcx
lea rcx, [rbp + 0x30]
mov rax, qword [rbp]
movdqa xmm2, xmmword [rbp + 0x30]
xorps xmm2, xmmword [rbp + 0x80]
movdqa xmm0, xmmword [rbp + 0x40]
movdqa xmm1, xmmword [rbp + 0x50]
xorps xmm0, xmmword [rbp + 0x90]
mov qword [rbp + 0xa8], rax
movq rax, xmm2
xorps xmm1, xmmword [rbp + 0xa0]
movdqa xmmword [rbp + 0x30], xmm2
movdqa xmmword [rbp + 0x40], xmm0
movdqa xmmword [rbp + 0x50], xmm1
test al, al
je 0x180056bfb
nop dword [rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x180056bf0
mov rcx, qword [0x180177ed8]
sub r8d, edx
lea rdx, [rbp + 0x30]
mov qword [rsp + 0x20], r15
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r14
mov rcx, rbx
call fcn.180074050
movabs rax, 0xcd3ce994f78c4739
lea rdx, [rbp + 0x20]
mov qword [rbp], rax
lea rcx, [rbp + 0x20]
mov rax, qword [rbp]
mov r8d, edx
mov qword [rbp + 0x20], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0x28], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0x80], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
movdqa xmm0, xmmword [rbp + 0x20]
mov qword [rbp + 0x88], rax
xorps xmm0, xmmword [rbp + 0x80]
movq rax, xmm0
movdqa xmmword [rbp + 0x20], xmm0
test al, al
je 0x180056c9b
nop word [rax + rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x180056c90
mov rcx, qword [0x180177ed8]
sub r8d, edx
lea rdx, [rbp + 0x20]
mov qword [rsp + 0x20], r15
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor al, al
mov rcx, qword [rbp + 0x2c0]
xor rcx, rbp
call fcn.1800d9270
mov rbx, qword [rbp + 0x300]
mov rsi, qword [rbp + 0x308]
mov rdi, qword [rbp + 0x310]
lea rsp, [rbp + 0x2d0]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov qword [rbp + 0x18], 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 + 0x20], rax
mov r8d, edi
mov rcx, r13
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180056d56
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x180056a8c
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180056a8c
movabs rax, 0xbb62c62c9808ea37
mov dword [rbp + 8], 0x3e8
movabs r15, 0x2b9fff192bd4c83e
mov qword [rbp + 0x60], rax
xor edi, edi
mov qword [rbp + 0x68], r15
lea rdx, [rbp + 8]
mov qword [rbp + 0x78], rdi
lea rcx, [rbp + 0x60]
mov qword [rbp + 0x70], 4
call fcn.1800548c0
mov rax, qword [rbx]
lea rdx, [rbx + 8]
mov qword [rbp + 0x60], rax
movabs r11, 0x889f8b4975721ba3
mov rcx, qword [rdx]
movabs rax, 0x8cb0c9a388179fe5
add rdx, 8
mov qword [rbp + 0x68], rcx
movabs r9, 0x566c1c811e86d8fd
movabs r10, 0x8012fbb270cb163d
movabs r12, 0xa00a62a942b20165
movabs r8, 0x26efb703382e92fd
cmp rcx, rax
ja 0x180056e20
je 0x180057052
cmp rcx, r8
je 0x180057056
cmp rcx, r15
je 0x180057056
cmp rcx, r9
je 0x180057052
cmp rcx, r10
je 0x180057052
cmp rcx, r11
je 0x180057056
jmp 0x180056e75
cmp rcx, r12
je 0x180057056
movabs rax, 0xbaaedcff023465cb
cmp rcx, rax
je 0x180057056
movabs rax, 0xbf1d25349b935bb7
cmp rcx, rax
je 0x180057052
movabs rax, 0xcd2fd49bc6b014bd
cmp rcx, rax
je 0x180057056
movabs rax, 0xfb0ce58f438fe2a6
cmp rcx, rax
je 0x180057052
cmp qword [rbp + 0x70], 8
lea r10, [rbp + 0x78]
mov rax, qword [0x180178060]
mov rdi, qword [0x180178068]
cmova r10, qword [rbp + 0x78]
cmp rax, rdi
je 0x180056f25
nop word [rax + rax]
cmp qword [rax], rcx
je 0x180056eb0
add rax, 0x20
cmp rax, rdi
jne 0x180056ea0
jmp 0x180056f25
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x180056f25
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x180056f21
cmp rcx, qword [r8 + 8]
jne 0x180056f21
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x180056f04
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x180056f14
cmp rax, 2
jne 0x180056f12
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x180056f14
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x180056ed0
mov rsi, qword [rbp + 0x18]
xor edi, edi
mov r12, qword [0x180178080]
mov r15, qword [0x180178078]
mov qword [rbp + 0x10], r12
cmp r15, r12
je 0x18005742d
movabs r14, 0xffffffffffffff0
nop dword [rax]
mov rax, qword [r15]
lea r8, [rbp + 0x80]
mov qword [rbp + 0x80], rax
mov r9d, 0x10
mov rax, qword [r15 + 8]
mov rdx, rsi
mov rcx, rbx
mov qword [rbp + 0x88], rax
mov qword [rsp + 0x20], rdi
call fcn.180076820
mov rdx, rax
test rax, rax
jne 0x1800572f8
cmp qword [rbp + 0x70], 8
lea rax, [rbp + 0x78]
cmova rax, qword [rbp + 0x78]
cmp dword [rax], 0x3e8
jge 0x180057418
mov r9d, 2
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x180057418
mov rcx, r15
call fcn.180054980
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
test rdx, rdx
je 0x180057094
mov rcx, r15
call fcn.180054980
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
mov rcx, r15
cmp rdx, 0x400
ja 0x180057064
call fcn.180054980
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
lea rax, [rdx + 0xf]
cmp rax, rdx
ja 0x18005702f
mov rax, r14
and rax, 0xfffffffffffffff0
call fcn.1800d9bb0
sub rsp, rax
lea r14, [rsp + 0x40]
test r14, r14
je 0x180057097
mov dword [r14], 0xcccc
add r14, 0x10
jmp 0x180057097
add rdx, 8
lea rcx, [rbp + 0x60]
call fcn.1800548c0
jmp 0x180056f27
call fcn.180054980
add rax, 0x10
mov rcx, rdi
lea rdx, [rax + 0x10]
cmp rdx, rax
cmova rcx, rdx
call fcn.1800e5130
mov r14, rax
test rax, rax
je 0x180057097
mov dword [rax], 0xdddd
add r14, 0x10
jmp 0x180057097
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 0x180057123
je 0x1800572a2
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x1800572ad
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x1800572ad
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x1800572a2
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x1800572a2
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
je 0x1800572ad
jmp 0x180057182
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x1800572ad
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x1800572ad
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x1800572a2
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x1800572ad
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x1800572a2
cmp qword [r15 + 0x10], 8
lea r12, [r15 + 0x18]
jbe 0x180057191
mov r12, qword [r12]
mov rdi, qword [0x180178060]
mov rcx, qword [0x180178068]
cmp rdi, rcx
je 0x1800571b2
cmp qword [rdi], rax
je 0x180057226
add rdi, 0x20
cmp rdi, rcx
jne 0x1800571a4
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
xor r8d, r8d
mov edx, 0x10
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x180057213
lea rcx, [rbp + 0x60]
mov dword [rbp + 8], 0x3e8
call fcn.180054980
mov r8, rax
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea rdx, [rbp + 8]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rbp + 0x20]
movabs r14, 0xffffffffffffff0
jmp 0x180057418
mov rcx, r15
call fcn.180054980
mov qword [rbx], rax
add rbx, 8
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r8
je 0x1800571b2
nop word [rax + rax]
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 0x180057280
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x180057290
cmp rax, 2
jne 0x18005728e
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x180057290
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x180057250
jmp 0x1800571b2
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 0x1800572be
mov rsi, qword [rsi]
mov rax, rcx
mov rdi, rbx
and eax, 3
jne 0x1800572e3
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [r15 + 0x10]
jmp 0x1800571b6
rep movsb byte [rdi], byte [rsi]
add rbx, qword [r15 + 0x10]
jmp 0x1800571b6
cmp rax, 2
jne 0x1800572d8
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [r15 + 0x10]
jmp 0x1800571b6
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 0x180057380
je 0x18005769e
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x1800576a2
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x1800576a2
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x18005769e
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x18005769e
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
je 0x1800576a2
jmp 0x1800573df
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x1800576a2
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x1800576a2
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x18005769e
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x1800576a2
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18005769e
cmp qword [r15 + 0x10], 8
lea r10, [r15 + 0x18]
jbe 0x1800573ed
mov r10, qword [r10]
mov rax, qword [0x180178060]
mov rcx, qword [0x180178068]
cmp rax, rcx
je 0x180057418
mov rdi, qword [r15 + 8]
cmp qword [rax], rdi
je 0x18005761e
add rax, 0x20
cmp rax, rcx
jne 0x180057404
xor edi, edi
mov rsi, qword [rbp + 0x18]
add r15, 0x20
cmp r15, r12
jne 0x180056f50
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.180050bc0
mov dl, 1
call fcn.180073ee0
mov rbx, rax
lea rdx, [rbp + 0x30]
movabs rax, 0xae1c8df193ed2877
movabs rsi, 0xcd3ce994f78c471b
mov qword [rbp], rax
movabs rdi, 0xab0233a545d5cf34
mov rcx, qword [rbp]
movabs rax, 0xca7046c22cb3a15b
mov qword [rbp + 0x30], rcx
mov r8d, edx
mov qword [rbp], rax
movabs rax, 0x10fc5c7633a616a1
mov rcx, qword [rbp]
mov qword [rbp + 0x38], rcx
mov qword [rbp], rax
movabs rax, 0x2cdd8aa74aa0fc13
mov rcx, qword [rbp]
mov qword [rbp + 0x40], rcx
lea rcx, [rbp + 0x30]
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x48], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0x80], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0x88], rax
movabs rax, 0x7c953a565dc97fd5
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp + 0x90], rax
movabs rax, 0x2cdd8aa76880c676
mov qword [rbp], rax
mov rax, qword [rbp]
movdqa xmm1, xmmword [rbp + 0x30]
xorps xmm1, xmmword [rbp + 0x80]
movdqa xmm0, xmmword [rbp + 0x40]
mov qword [rbp + 0x98], rax
movq rax, xmm1
xorps xmm0, xmmword [rbp + 0x90]
movdqa xmmword [rbp + 0x30], xmm1
movdqa xmmword [rbp + 0x40], xmm0
test al, al
je 0x18005755b
nop
inc rcx
mov r8, rcx
cmp byte [rcx], 0
jne 0x180057550
mov rcx, qword [0x180177ed8]
sub r8d, edx
xor r15d, r15d
lea rdx, [rbp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r14
mov rcx, rbx
call fcn.180074050
movabs rax, 0xcd3ce994f78c4739
lea rdx, [rbp + 0x20]
mov qword [rbp], rax
lea rcx, [rbp + 0x20]
mov rax, qword [rbp]
mov r8d, edx
mov qword [rbp + 0x20], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp + 0x28], rax
mov qword [rbp], rsi
mov rax, qword [rbp]
mov qword [rbp + 0x80], rax
mov qword [rbp], rdi
mov rax, qword [rbp]
movdqa xmm0, xmmword [rbp + 0x20]
mov qword [rbp + 0x88], rax
xorps xmm0, xmmword [rbp + 0x80]
movq rax, xmm0
movdqa xmmword [rbp + 0x20], xmm0
test al, al
je 0x1800575fb
nop word [rax + rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x1800575f0
mov rcx, qword [0x180177ed8]
sub r8d, edx
lea rdx, [rbp + 0x20]
mov qword [rsp + 0x20], r15
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov al, 1
jmp 0x180056cb9
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x180057416
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x180057416
cmp rcx, qword [r8 + 8]
jne 0x180057416
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x18005767c
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18005768c
cmp rax, 2
jne 0x18005768a
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18005768c
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x180057640
jmp 0x180057416
add rdx, 8
mov rcx, r15
call fcn.1800548c0
jmp 0x180057418