Function at 0x459648
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r14
mov rbp, rsp
sub rsp, 0x50
cmp byte [rcx + 0x240], 0
mov rdi, rcx
je 0x459af2
and dword [rcx + 0x250], 0
lea rsi, [rcx + 0x2ac]
cmp dword [rdi + 0x268], 0
jne 0x4596e9
mov rcx, qword [rdi + 0x228]
xor eax, eax
mov r8d, dword [rsi]
mov rdx, qword [rdi + 0x2d0]
mov dword [rbp + 0x20], eax
cmp rcx, 0xffffffffffffffff
je 0x4596c6
test rdx, rdx
je 0x4596c6
test r8d, r8d
je 0x4596c6
and qword [rsp + 0x20], rax
lea r9, [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x20]
cmp eax, dword [rsi]
jne 0x459af2
mov rax, qword [rdi + 0x2d0]
and dword [rsi], 0
mov qword [rdi + 0x260], rax
mov dword [rdi + 0x268], 0x100000
mov rbx, qword [rdi + 0x270]
lea r14, [rdi + 0x248]
mov rcx, r14
mov edx, 4
call fcn.004670f0
mov ecx, dword [rdi + 0x270]
sub ecx, ebx
add dword [rsi], ecx
mov r8d, dword [rsi]
test eax, eax
je 0x459681
xor ecx, ecx
mov ebx, 0xfffffffd
lea r12d, [rcx + 1]
cmp eax, r12d
cmovne ecx, eax
test ebx, ecx
jne 0x459af2
test r8d, r8d
je 0x459773
mov rcx, qword [rdi + 0x228]
xor eax, eax
mov rdx, qword [rdi + 0x2d0]
mov dword [rbp + 0x20], eax
cmp rcx, 0xffffffffffffffff
je 0x45976b
test rdx, rdx
je 0x45976b
and qword [rsp + 0x20], rax
lea r9, [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x20]
cmp eax, dword [rsi]
jne 0x459af2
mov rcx, r14
call fcn.00467a3c
and dword [rdi + 0x2a8], 0
test ebx, eax
jne 0x459af2
mov ecx, dword [rdi + 0x2dc]
xor eax, eax
mov rdx, qword [rdi + 0x2b8]
lea esi, [rax + 4]
mov byte [rax + rdx + 0x10], cl
add rax, r12
shr ecx, 8
cmp rax, rsi
jl 0x45979c
mov r8d, 2
mov r14d, 0xffffffff
lea r9d, [r8 + 6]
cmp qword [rdi + 0x258], r14
jae 0x45981c
cmp qword [rdi + 0x270], r14
jae 0x45981c
mov ecx, dword [rdi + 0x270]
xor eax, eax
mov rdx, qword [rdi + 0x2b8]
mov byte [rax + rdx + 0x14], cl
add rax, r12
shr ecx, 8
cmp rax, rsi
jl 0x4597dc
mov ecx, dword [rdi + 0x258]
xor eax, eax
mov rdx, qword [rdi + 0x2b8]
mov byte [rdx + rax + 0x18], cl
add rax, r12
shr ecx, 8
cmp rax, rsi
jl 0x4597fa
mov r8d, dword [rdi + 0x2c0]
mov rdx, qword [rdi + 0x2b8]
jmp 0x4598f5
mov rdx, qword [rdi + 0x2b8]
mov ecx, r14d
xor eax, eax
mov byte [rax + rdx + 0x14], cl
add rax, r12
shr ecx, 8
cmp rax, rsi
jl 0x459828
mov rdx, qword [rdi + 0x2b8]
mov ecx, r14d
xor eax, eax
mov byte [rax + rdx + 0x18], cl
add rax, r12
shr ecx, 8
cmp rax, rsi
jl 0x459843
mov rax, r12
lea rcx, [rbp - 0x20]
mov rdx, r8
mov byte [rcx], al
add rcx, r12
shr rax, 8
sub rdx, r12
jne 0x45985c
lea eax, [rdx + 0x10]
mov rdx, r8
lea rcx, [rbp - 0x1e]
mov byte [rcx], al
add rcx, r12
shr rax, 8
sub rdx, r12
jne 0x459874
mov rax, qword [rdi + 0x258]
lea rcx, [rbp - 0x1c]
mov rdx, r9
mov byte [rcx], al
add rcx, r12
shr rax, 8
sub rdx, r12
jne 0x459890
mov rax, qword [rdi + 0x270]
lea rcx, [rbp - 0x14]
mov rdx, r9
mov byte [rcx], al
add rcx, r12
shr rax, 8
sub rdx, r12
jne 0x4598ac
lea ecx, [rdx + 0x14]
xor eax, eax
mov rdx, qword [rdi + 0x2b8]
mov byte [rax + rdx + 0x1e], cl
add rax, r12
shr ecx, 8
cmp rax, r8
jl 0x4598c6
mov r8d, dword [rdi + 0x2c0]
mov rcx, rdi
mov rdx, qword [rdi + 0x2b8]
call fcn.00459500
mov r8d, shutdown
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.00459500
mov rcx, qword [rdi + 0x2b8]
test rcx, rcx
je 0x459916
call fcn.00422660
and qword [rdi + 0x2b8], 0
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459af2
and qword [rbp + 0x20], 0
lea r8, [rbp + 0x24]
mov r9d, r12d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x20], eax
cmp eax, r14d
jne 0x459951
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459af2
mov rbx, qword [rbp + 0x20]
cmp rbx, 0xffffffffffffffff
je 0x459af2
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459af2
mov eax, dword [rdi + 0x2b0]
lea r8, [rbp + 0x24]
add eax, 0xe
xor r9d, r9d
mov edx, eax
mov qword [rbp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x20], eax
cmp eax, r14d
jne 0x4599a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459af2
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x459af2
mov edx, dword [rdi + 0x2dc]
mov r8d, esi
mov rcx, rdi
call fcn.0045a2f4
cmp byte [rdi + 0x2ec], 0
mov r8d, esi
mov rcx, rdi
jne 0x4599ee
mov edx, dword [rdi + 0x270]
call fcn.0045a2f4
mov edx, dword [rdi + 0x258]
mov r8d, esi
mov rcx, rdi
call fcn.0045a2f4
jmp 0x459aa6
mov edx, r14d
call fcn.0045a2f4
mov r8d, esi
mov edx, r14d
mov rcx, rdi
call fcn.0045a2f4
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459af2
mov eax, dword [rdi + 0x2b0]
lea r8, [rbp + 0x24]
mov edx, dword [rdi + 0x2e8]
xor r9d, r9d
add edx, 0x1e
add eax, edx
mov edx, eax
mov qword [rbp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x20], eax
cmp eax, r14d
jne 0x459a4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459af2
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x459af2
mov r8d, 2
mov edx, r12d
mov rcx, rdi
call fcn.0045a2f4
mov edx, select
mov rcx, rdi
lea r8d, [rdx - 0xe]
call fcn.0045a2f4
mov rdx, qword [rdi + 0x258]
mov r8d, 8
mov rcx, rdi
call fcn.0045a284
mov rdx, qword [rdi + 0x270]
mov r8d, 8
mov rcx, rdi
call fcn.0045a284
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459af2
xor r9d, r9d
mov qword [rbp + 0x20], rbx
lea r8, [rbp + 0x24]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x20], eax
cmp eax, r14d
jne 0x459ad8
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459af2
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x459af2
add dword [rdi + 0x2f4], r12d
mov al, r12b
mov byte [rdi + 0x240], 0
jmp 0x459af4
xor al, al
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rbp
ret