Function at 0x1800578d0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
mov rax, qword [0x18017b040]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
mov rax, qword [0x18017c050]
mov r14, qword [rax + rcx*8]
lea rax, [rbp - 0x30]
movzx ecx, word [0x18017d500]
mov qword [rsp + 0x50], r14
test cx, cx
je 0x180057940
lea rdx, [0x18017d500]
lea rdi, [rbp - 0x30]
sub rdx, rdi
nop word [rax + rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x180057930
xor r12d, r12d
mov word [rax], r12w
movzx ecx, word [r14]
test cx, cx
je 0x180057970
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 0x180057960
mov qword [rsp + 0x328], rbx
lea rcx, [rbp - 0x30]
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov qword [rsp + 0x330], rsi
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov r8d, 1
mov qword [rsp + 0x338], r13
mov dword [rsp + 0x20], 2
mov word [rax], r12w
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp - 0x70], rax
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x180058158
movabs rax, 0xbb62c62c9808ea37
mov dword [rsp + 0x48], 0x3e8
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x48]
movabs rax, 0x2b9fff192bd4c83e
mov qword [rsp + 0x70], 4
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x78], r12
call fcn.180056310
lea rcx, [rsp + 0x60]
call fcn.1800563d0
mov rsi, qword [0x18017c088]
mov rdi, qword [0x18017c080]
lea r13, [rax + 0x10]
mov qword [rsp + 0x48], r13
cmp rdi, rsi
je 0x180057a50
mov rcx, rdi
call fcn.1800563d0
add r13, 0x10
add rdi, 0x20
add r13, rax
cmp rdi, rsi
jne 0x180057a33
mov qword [rsp + 0x48], r13
xor r9d, r9d
xor r8d, r8d
mov edx, r13d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x180057a95
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x180057a95
lea rcx, [rsp + 0x60]
call fcn.180051460
jmp 0x180058158
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x60]
movabs rdx, 0x8cb0c9a388179fe5
mov qword [rsp + 0x40], rax
movabs rsi, 0x26efb703382e92fd
movabs r10, 0x889f8b4975721ba3
movabs r12, 0xfb0ce58f438fe2a6
mov qword [rax], rcx
lea rbx, [rax + 8]
mov rcx, qword [rsp + 0x68]
movabs rdi, 0xbf1d25349b935bb7
mov qword [rbx], rcx
movabs r8, 0x566c1c811e86d8fd
mov rax, qword [rsp + 0x68]
add rbx, 8
movabs rcx, 0xbaaedcff023465cb
movabs r9, 0x8012fbb270cb163d
movabs r11, 0xa00a62a942b20165
movabs r14, 0xcd2fd49bc6b014bd
cmp rax, rdx
ja 0x180057b73
je 0x180057d12
cmp rax, rsi
je 0x180057d1e
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x180057d1e
cmp rax, r8
je 0x180057d12
cmp rax, r9
je 0x180057d12
cmp rax, r10
je 0x180057d1e
jmp 0x180057ba0
cmp rax, r11
je 0x180057d1e
cmp rax, rcx
je 0x180057d1e
cmp rax, rdi
je 0x180057d12
cmp rax, r14
je 0x180057d1e
cmp rax, r12
je 0x180057d12
cmp qword [rsp + 0x70], 8
lea r14, [rsp + 0x78]
mov rdi, qword [0x18017c068]
mov rcx, qword [0x18017c070]
cmova r14, qword [rsp + 0x78]
cmp rdi, rcx
je 0x180057c89
cmp qword [rdi], rax
je 0x180057bdb
add rdi, 0x20
cmp rdi, rcx
jne 0x180057bc8
jmp 0x180057c89
lea rcx, [rsp + 0x60]
call fcn.1800563d0
mov qword [rbx], rax
add rbx, 8
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r8
je 0x180057c57
nop dword [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, r14
and eax, 3
jne 0x180057c30
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x180057c40
cmp rax, 2
jne 0x180057c3e
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x180057c40
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x180057c00
movabs rsi, 0x26efb703382e92fd
movabs r11, 0xa00a62a942b20165
movabs r10, 0x889f8b4975721ba3
movabs r9, 0x8012fbb270cb163d
movabs r8, 0x566c1c811e86d8fd
movabs rdx, 0x8cb0c9a388179fe5
mov rax, qword [0x18017c088]
mov r12, qword [0x18017c080]
cmp r12, rax
je 0x180057ed5
lea r14, [r12 + 0x18]
mov r13, rax
nop dword [rax + rax]
mov rax, qword [r12]
mov qword [rbx], rax
mov rax, qword [r14 - 0x10]
mov qword [rbx + 8], rax
add rbx, 0x10
mov rax, qword [r14 - 0x10]
cmp rax, rdx
ja 0x180057d8d
je 0x1800580fe
cmp rax, rsi
je 0x180058109
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x180058109
cmp rax, r8
je 0x1800580fe
cmp rax, r9
je 0x1800580fe
cmp rax, r10
je 0x180058109
jmp 0x180057de2
mov rax, qword [rsp + 0x70]
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [rsp + 0x70]
lea rsi, [rsp + 0x78]
cmp rcx, 8
mov rax, rcx
mov rdi, rbx
cmova rsi, qword [rsp + 0x78]
and eax, 3
jne 0x180057d6d
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [rsp + 0x70]
movabs rsi, 0x26efb703382e92fd
jmp 0x180057c89
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rsp + 0x70]
movabs rsi, 0x26efb703382e92fd
jmp 0x180057c89
cmp rax, 2
jne 0x180057d57
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [rsp + 0x70]
movabs rsi, 0x26efb703382e92fd
jmp 0x180057c89
cmp rax, r11
je 0x180058109
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x180058109
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x1800580fe
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x180058109
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x1800580fe
cmp qword [r14 - 8], 8
mov r15, r14
jbe 0x180057def
mov r15, qword [r14]
mov rdi, qword [0x18017c068]
mov rcx, qword [0x18017c070]
cmp rdi, rcx
je 0x180057e89
cmp qword [rdi], rax
je 0x180057e16
add rdi, 0x20
cmp rdi, rcx
jne 0x180057e06
jmp 0x180057e89
mov rcx, r12
call fcn.1800563d0
mov qword [rbx], rax
add rbx, 8
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r8
je 0x180057e7f
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, r15
and eax, 3
jne 0x180057e62
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x180057e72
cmp rax, 2
jne 0x180057e70
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x180057e72
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x180057e32
movabs rdx, 0x8cb0c9a388179fe5
add r12, 0x20
add r14, 0x20
movabs rsi, 0x26efb703382e92fd
movabs r8, 0x566c1c811e86d8fd
movabs r9, 0x8012fbb270cb163d
movabs r10, 0x889f8b4975721ba3
movabs r11, 0xa00a62a942b20165
cmp r12, r13
jne 0x180057cb0
mov r13, qword [rsp + 0x48]
mov r15, qword [rbp - 0x70]
mov rdx, qword [rsp + 0x40]
xor r12d, r12d
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov r8d, r13d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
mov edi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x40]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, [rsp + 0x60]
call fcn.180051460
test edi, edi
je 0x180058153
mov dl, 1
call fcn.180076ed0
mov rbx, rax
lea rdx, [rsp + 0x60]
movabs rax, 0x9d37d3d5277785ce
movabs rsi, 0xf254f3b14201e4bd
mov qword [rsp + 0x40], rax
movabs rdi, 0x1cfbf1a4b5f30182
mov rcx, qword [rsp + 0x40]
movabs rax, 0x689a83d1d29a67ec
mov qword [rsp + 0x60], rcx
mov r8d, edx
mov qword [rsp + 0x40], rax
movabs rax, 0xc6206c052aa66fe6
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x40], rax
movabs rax, 0xd5c8df4699bc3e1e
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x70], rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x40], rsi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x58], rax
movabs rax, 0xa34c05630ac8008f
movdqa xmm1, xmmword [rbp - 0x60]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x50], rax
movabs rax, 0xd5c8df46999e1e24
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
xorps xmm1, xmmword [rsp + 0x60]
movdqa xmm0, xmmword [rsp + 0x70]
mov qword [rbp - 0x48], rax
movq rax, xmm1
xorps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rsp + 0x60], xmm1
test al, al
je 0x18005803b
nop dword [rax + rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r12b
jne 0x180058030
mov rcx, qword [0x18017bed8]
sub r8d, edx
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x20], r12
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.180077040
movabs rax, 0xf254f3b14201e49f
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x40], rax
lea rcx, [rbp - 0x70]
mov rax, qword [rsp + 0x40]
mov r8d, edx
mov qword [rbp - 0x70], rax
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x68], rax
mov qword [rsp + 0x40], rsi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
movdqa xmm0, xmmword [rbp - 0x70]
mov qword [rbp - 0x58], rax
xorps xmm0, xmmword [rbp - 0x60]
movq rax, xmm0
movdqa xmmword [rbp - 0x70], xmm0
test al, al
je 0x1800580db
nop dword [rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r12b
jne 0x1800580d0
mov rcx, qword [0x18017bed8]
sub r8d, edx
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x20], r12
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov al, 1
jmp 0x180058389
mov rax, qword [r14 - 8]
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [r14 - 8]
mov rsi, r14
cmp rcx, 8
jbe 0x180058119
mov rsi, qword [r14]
mov rax, rcx
mov rdi, rbx
and eax, 3
jne 0x18005813e
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [r14 - 8]
jmp 0x180057e89
rep movsb byte [rdi], byte [rsi]
add rbx, qword [r14 - 8]
jmp 0x180057e89
cmp rax, 2
jne 0x180058133
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [r14 - 8]
jmp 0x180057e89
mov r14, qword [rsp + 0x50]
mov dl, 2
call fcn.180076ed0
mov rbx, rax
lea rdx, [rsp + 0x60]
movabs rax, 0x867497d42e6885db
movabs rsi, 0xf254f3b14201e4bd
mov qword [rsp + 0x40], rax
movabs rdi, 0x1cfbf1a4b5f30182
mov rcx, qword [rsp + 0x40]
movabs rax, 0x7fdb94d2d48021ed
mov qword [rsp + 0x60], rcx
mov r8d, edx
mov qword [rsp + 0x40], rax
movabs rax, 0xc23e700463ae6ee0
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x40], rax
movabs rax, 0xb9a1b966f7f17750
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x70], rcx
movabs rcx, 0xd01dd35872029c76
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x78], rax
movabs rax, 0x920b3f354a825664
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x80], rax
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x78], rax
mov qword [rsp + 0x40], rsi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x58], rax
movabs rax, 0xa34c05630ac8008f
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x50], rax
movabs rax, 0xd5c8df46999e1e24
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x48], rax
movabs rax, 0x920b3f3568a26c01
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x40], rax
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x40]
movdqa xmm2, xmmword [rsp + 0x60]
xorps xmm2, xmmword [rbp - 0x60]
movdqa xmm0, xmmword [rsp + 0x70]
movdqa xmm1, xmmword [rbp - 0x80]
xorps xmm0, xmmword [rbp - 0x50]
mov qword [rbp - 0x38], rax
movq rax, xmm2
xorps xmm1, xmmword [rbp - 0x40]
movdqa xmmword [rsp + 0x60], xmm2
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rbp - 0x80], xmm1
test al, al
je 0x1800582cb
inc rcx
mov r8, rcx
cmp byte [rcx], 0
jne 0x1800582c0
mov rcx, qword [0x18017bed8]
sub r8d, edx
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x20], r12
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r14
mov rcx, rbx
call fcn.180077040
movabs rax, 0xf254f3b14201e49f
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x40], rax
lea rcx, [rbp - 0x70]
mov rax, qword [rsp + 0x40]
mov r8d, edx
mov qword [rbp - 0x70], rax
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x68], rax
mov qword [rsp + 0x40], rsi
mov rax, qword [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
movdqa xmm0, xmmword [rbp - 0x70]
mov qword [rbp - 0x58], rax
xorps xmm0, xmmword [rbp - 0x60]
movq rax, xmm0
movdqa xmmword [rbp - 0x70], xmm0
test al, al
je 0x18005836b
nop word [rax + rax]
inc rcx
mov r8, rcx
cmp byte [rcx], 0
jne 0x180058360
mov rcx, qword [0x18017bed8]
sub r8d, edx
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x20], r12
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor al, al
mov r13, qword [rsp + 0x338]
mov rsi, qword [rsp + 0x330]
mov rbx, qword [rsp + 0x328]
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.1800dbf00
add rsp, 0x2f0
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret