Function at 0x45971c
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 0x459bc6
and dword [rcx + 0x250], 0
lea rsi, [rcx + 0x2ac]
cmp dword [rdi + 0x268], 0
jne 0x4597bd
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 0x45979a
test rdx, rdx
je 0x45979a
test r8d, r8d
je 0x45979a
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 0x459bc6
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.004671c4
mov ecx, dword [rdi + 0x270]
sub ecx, ebx
add dword [rsi], ecx
mov r8d, dword [rsi]
test eax, eax
je 0x459755
xor ecx, ecx
mov ebx, 0xfffffffd
lea r12d, [rcx + 1]
cmp eax, r12d
cmovne ecx, eax
test ebx, ecx
jne 0x459bc6
test r8d, r8d
je 0x459847
mov rcx, qword [rdi + 0x228]
xor eax, eax
mov rdx, qword [rdi + 0x2d0]
mov dword [rbp + 0x20], eax
cmp rcx, 0xffffffffffffffff
je 0x45983f
test rdx, rdx
je 0x45983f
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 0x459bc6
mov rcx, r14
call fcn.00467b10
and dword [rdi + 0x2a8], 0
test ebx, eax
jne 0x459bc6
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 0x459870
mov r8d, 2
mov r14d, 0xffffffff
lea r9d, [r8 + 6]
cmp qword [rdi + 0x258], r14
jae 0x4598f0
cmp qword [rdi + 0x270], r14
jae 0x4598f0
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 0x4598b0
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 0x4598ce
mov r8d, dword [rdi + 0x2c0]
mov rdx, qword [rdi + 0x2b8]
jmp 0x4599c9
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 0x4598fc
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 0x459917
mov rax, r12
lea rcx, [rbp - 0x20]
mov rdx, r8
mov byte [rcx], al
add rcx, r12
shr rax, 8
sub rdx, r12
jne 0x459930
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 0x459948
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 0x459964
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 0x459980
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 0x45999a
mov r8d, dword [rdi + 0x2c0]
mov rcx, rdi
mov rdx, qword [rdi + 0x2b8]
call fcn.004595d4
mov r8d, shutdown
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.004595d4
mov rcx, qword [rdi + 0x2b8]
test rcx, rcx
je 0x4599ea
call fcn.00422660
and qword [rdi + 0x2b8], 0
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459bc6
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 0x459a25
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459bc6
mov rbx, qword [rbp + 0x20]
cmp rbx, 0xffffffffffffffff
je 0x459bc6
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459bc6
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 0x459a76
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459bc6
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x459bc6
mov edx, dword [rdi + 0x2dc]
mov r8d, esi
mov rcx, rdi
call fcn.0045a3c8
cmp byte [rdi + 0x2ec], 0
mov r8d, esi
mov rcx, rdi
jne 0x459ac2
mov edx, dword [rdi + 0x270]
call fcn.0045a3c8
mov edx, dword [rdi + 0x258]
mov r8d, esi
mov rcx, rdi
call fcn.0045a3c8
jmp 0x459b7a
mov edx, r14d
call fcn.0045a3c8
mov r8d, esi
mov edx, r14d
mov rcx, rdi
call fcn.0045a3c8
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459bc6
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 0x459b23
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459bc6
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x459bc6
mov r8d, 2
mov edx, r12d
mov rcx, rdi
call fcn.0045a3c8
mov edx, select
mov rcx, rdi
lea r8d, [rdx - 0xe]
call fcn.0045a3c8
mov rdx, qword [rdi + 0x258]
mov r8d, 8
mov rcx, rdi
call fcn.0045a358
mov rdx, qword [rdi + 0x270]
mov r8d, 8
mov rcx, rdi
call fcn.0045a358
mov rcx, qword [rdi + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x459bc6
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 0x459bac
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459bc6
cmp qword [rbp + 0x20], 0xffffffffffffffff
je 0x459bc6
add dword [rdi + 0x2f4], r12d
mov al, r12b
mov byte [rdi + 0x240], 0
jmp 0x459bc8
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