Function at 0x18004ed00
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r15
lea rbp, [rsp - 0x1b8]
sub rsp, 0x2b8
mov rax, qword [0x18012d040]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov rax, qword [0x18012e040]
mov rdx, qword [rax + rcx*8]
lea rax, [rbp - 0x70]
movzx ecx, word [0x18012f480]
test cx, cx
je 0x18004ed60
lea rdi, [0x18012f480]
lea rsi, [rbp - 0x70]
sub rdi, rsi
nop
mov word [rax], cx
add rax, 2
movzx ecx, word [rdi + rax]
test cx, cx
jne 0x18004ed50
xor edi, edi
mov word [rax], di
movzx ecx, word [rdx]
test cx, cx
je 0x18004ed80
sub rdx, rax
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x18004ed70
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x2f0], r13
lea rcx, [rbp - 0x70]
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov qword [rsp + 0x2b0], r14
lea r8d, [r9 + 1]
mov word [rax], di
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x18004ee9d
movabs rax, 0xbb62c62c9808ea37
mov dword [rsp + 0x48], 0x3e8
movabs r14, 0x2b9fff192bd4c83e
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x70], r14
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x78], 4
mov qword [rbp - 0x80], rdi
call fcn.18004dc10
lea rcx, [rsp + 0x68]
call fcn.18004dcd0
mov rsi, qword [0x18012e078]
mov rdi, qword [0x18012e070]
lea r13, [rax + 0x10]
mov qword [rsp + 0x50], r13
cmp rdi, rsi
je 0x18004ee55
mov rcx, rdi
call fcn.18004dcd0
add r13, 0x10
add rdi, 0x20
add r13, rax
cmp rdi, rsi
jne 0x18004ee38
mov qword [rsp + 0x50], r13
xor r9d, r9d
xor r8d, r8d
mov edx, r13d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18004efe3
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 0x18004efe3
lea rcx, [rsp + 0x68]
call fcn.18004b7a0
movabs rax, 0x6ca7833c0b1d8433
movabs rcx, 0x920f5d30473f0e32
mov qword [rsp + 0x40], rax
movabs rdi, 0x6e891a7c8654f826
mov rax, qword [rsp + 0x40]
movabs rdx, 0x1887e7596774e555
movabs rax, 0xf12f3846264c2e5d
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0xe8864044d17e39e8
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0xc9e03ffa4f6902d8
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0x573743a5385cb99c
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rdx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
movabs rax, 0x89f43523b8185787
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0xa58959da21066bac
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0x573743a51a7c83f9
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rdi
mov rax, qword [rsp + 0x40]
movabs rax, 0x1887e7596774e577
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rdx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
xor al, al
mov r14, qword [rsp + 0x2b0]
mov r13, qword [rsp + 0x2f0]
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.1800c4b70
add rsp, 0x2b8
pop r15
pop rdi
pop rsi
pop rbp
ret
mov qword [rsp + 0x2e0], rbx
mov qword [rsp + 0x2e8], r12
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 + 0x68]
movabs rdx, 0x8cb0c9a388179fe5
mov qword [rsp + 0x40], rax
movabs rsi, 0x26efb703382e92fd
movabs rdi, 0xbf1d25349b935bb7
movabs r10, 0x889f8b4975721ba3
mov qword [rax], rcx
lea rbx, [rax + 8]
mov rcx, qword [rsp + 0x70]
movabs r8, 0x566c1c811e86d8fd
mov qword [rbx], rcx
movabs r9, 0x8012fbb270cb163d
mov rax, qword [rsp + 0x70]
add rbx, 8
movabs rcx, 0xbaaedcff023465cb
movabs r11, 0xa00a62a942b20165
movabs r12, 0xcd2fd49bc6b014bd
cmp rax, rdx
ja 0x18004f0bd
je 0x18004f262
cmp rax, rsi
je 0x18004f26e
cmp rax, r14
je 0x18004f26e
cmp rax, r8
je 0x18004f262
cmp rax, r9
je 0x18004f262
cmp rax, r10
je 0x18004f26e
jmp 0x18004f0f4
cmp rax, r11
je 0x18004f26e
cmp rax, rcx
je 0x18004f26e
cmp rax, rdi
je 0x18004f262
cmp rax, r12
je 0x18004f26e
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18004f262
cmp qword [rsp + 0x78], 8
lea r14, [rbp - 0x80]
mov rdi, qword [0x18012e058]
mov rcx, qword [0x18012e060]
cmova r14, qword [rbp - 0x80]
cmp rdi, rcx
je 0x18004f1da
nop word [rax + rax]
cmp qword [rdi], rax
je 0x18004f133
add rdi, 0x20
cmp rdi, rcx
jne 0x18004f120
jmp 0x18004f1da
lea rcx, [rsp + 0x68]
call fcn.18004dcd0
mov qword [rbx], rax
add rbx, 8
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r8
je 0x18004f1a8
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 0x18004f181
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18004f191
cmp rax, 2
jne 0x18004f18f
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18004f191
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x18004f151
movabs rsi, 0x26efb703382e92fd
movabs r11, 0xa00a62a942b20165
movabs r10, 0x889f8b4975721ba3
movabs r9, 0x8012fbb270cb163d
movabs r8, 0x566c1c811e86d8fd
movabs rdx, 0x8cb0c9a388179fe5
mov rax, qword [0x18012e078]
mov r12, qword [0x18012e070]
cmp r12, rax
je 0x18004f424
lea r14, [r12 + 0x18]
mov r13, rax
nop dword [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 0x18004f2db
je 0x18004f55d
cmp rax, rsi
je 0x18004f568
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x18004f568
cmp rax, r8
je 0x18004f55d
cmp rax, r9
je 0x18004f55d
cmp rax, r10
je 0x18004f568
jmp 0x18004f330
mov rax, qword [rsp + 0x78]
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [rsp + 0x78]
lea rsi, [rbp - 0x80]
cmp rcx, 8
mov rax, rcx
mov rdi, rbx
cmova rsi, qword [rbp - 0x80]
and eax, 3
jne 0x18004f2bb
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [rsp + 0x78]
movabs rsi, 0x26efb703382e92fd
jmp 0x18004f1da
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rsp + 0x78]
movabs rsi, 0x26efb703382e92fd
jmp 0x18004f1da
cmp rax, 2
jne 0x18004f2a5
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [rsp + 0x78]
movabs rsi, 0x26efb703382e92fd
jmp 0x18004f1da
cmp rax, r11
je 0x18004f568
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x18004f568
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x18004f55d
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x18004f568
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18004f55d
cmp qword [r14 - 8], 8
mov r15, r14
jbe 0x18004f33d
mov r15, qword [r14]
mov rdi, qword [0x18012e058]
mov rcx, qword [0x18012e060]
cmp rdi, rcx
je 0x18004f3d7
cmp qword [rdi], rax
je 0x18004f364
add rdi, 0x20
cmp rdi, rcx
jne 0x18004f354
jmp 0x18004f3d7
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 0x18004f3cd
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 0x18004f3b0
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18004f3c0
cmp rax, 2
jne 0x18004f3be
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18004f3c0
rep movsb byte [rdi], byte [rsi]
add rbx, qword [rdx + 0x10]
add rdx, 0x20
cmp rdx, r8
jne 0x18004f380
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 0x18004f200
mov r13, qword [rsp + 0x50]
mov r15, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x40]
xor r9d, r9d
mov r8d, r13d
mov qword [rsp + 0x20], 0
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 + 0x68]
call fcn.18004b7a0
mov r12, qword [rsp + 0x2e8]
mov rbx, qword [rsp + 0x2e0]
test edi, edi
je 0x18004ee9d
movabs rcx, 0x920f5d30473f0e32
movabs rax, 0x77e4c73d02028426
mov qword [rsp + 0x40], rax
movabs rdx, 0x1887e7596774e555
mov rax, qword [rsp + 0x40]
movabs rax, 0xe66e2f452056685c
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0xec985c45987638ee
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0xa58959da21244b96
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rdx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
movabs rax, 0x89f43523b8185787
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0xa58959da21066bac
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movabs rax, 0x1887e7596774e577
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rdx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsp + 0x40]
mov al, 1
jmp 0x18004efb7
mov rax, qword [r14 - 8]
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [r14 - 8]
mov rsi, r14
cmp rcx, 8
jbe 0x18004f578
mov rsi, qword [r14]
mov rax, rcx
mov rdi, rbx
and eax, 3
jne 0x18004f59d
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [r14 - 8]
jmp 0x18004f3d7
rep movsb byte [rdi], byte [rsi]
add rbx, qword [r14 - 8]
jmp 0x18004f3d7
cmp rax, 2
jne 0x18004f592
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [r14 - 8]
jmp 0x18004f3d7