Function at 0x140026160
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x4f]
sub rsp, 0xf8
cmp qword [0x14009bba8], 0
mov rbx, rcx
jne 0x140026189
cmp byte [0x14009c248], 0
je 0x1400263db
mov qword [rsp + 0xf0], rdi
lea rcx, [0x14009bbb0]
mov qword [rsp + 0xe8], r14
mov qword [rsp + 0xe0], r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rbx]
xor r15d, r15d
mov r9d, dword [0x14009bbd8]
add r9d, 0x24
mov rcx, qword [rax]
mov rax, qword [rcx + 8]
mov ecx, dword [rax + 0xa0]
mov rax, qword [rbx + 8]
mov dword [rbp - 0x69], ecx
mov ecx, dword [rax]
mov rax, qword [rbx + 0x10]
mov dword [rbp - 0x61], ecx
mov ecx, dword [rax]
mov rax, qword [rbx]
mov dword [rbp - 0x5d], ecx
mov rcx, qword [rax]
mov eax, r15d
mov rdx, qword [rcx + 8]
lea rcx, [r15 - 1]
sub eax, dword [rdx]
movsxd r8, dword [rdx]
add r8, rdx
neg eax
sbb rax, rax
and r8, rax
jne 0x140026210
mov edx, r15d
mov dword [rbp - 0x49], r15d
mov eax, r15d
jmp 0x140026222
mov rdx, rcx
inc rdx
cmp byte [r8 + rdx], r15b
jne 0x140026213
mov dword [rbp - 0x49], edx
mov eax, r9d
mov dword [rbp - 0x55], eax
mov rax, qword [rbx + 0x18]
mov qword [rbp - 0x21], r8
lea r8d, [r9 + rdx]
mov rdx, qword [rax]
test rdx, rdx
jne 0x140026245
mov ecx, r15d
mov dword [rbp - 0x45], r15d
mov eax, r15d
jmp 0x140026255
inc rcx
cmp byte [rdx + rcx], r15b
jne 0x140026245
mov dword [rbp - 0x45], ecx
lea eax, [r8 + 5]
mov dword [rbp - 0x59], eax
add r8d, 0xa
mov rax, qword [rbx + 0x20]
add ecx, r8d
mov dword [rbp + 0x2f], ecx
mov r14d, 2
mov qword [rbp - 0x19], rdx
mov r8d, r14d
mov dword [rbp + 0x33], r14d
mov edx, r15d
mov ecx, dword [rax]
mov dword [rbp - 0x65], ecx
lea rcx, [rbp - 0x49]
nop dword [rax]
nop word [rax + rax]
add edx, 5
add edx, dword [rcx]
lea rcx, [rcx + 4]
sub r8, 1
jne 0x140026290
lea eax, [rdx + 0x24]
mov dword [rbp - 0x75], 6
mov dword [rbp - 0x79], eax
lea edx, [r8 + 0xc]
mov eax, dword [0x14009babc]
lea rcx, [rbp - 0x79]
mov dword [rbp - 0x71], eax
inc eax
mov dword [0x14009babc], eax
call fcn.140025590
cmp byte [0x14009c248], r15b
mov ebx, 0x18
je 0x140026330
mov qword [rsp + 0x110], rsi
mov edi, r15d
lea rsi, [rbp - 0x69]
nop word [rax + rax]
mov rcx, qword [0x1400d1370]
lea r9, [rbp + 0x6f]
mov r8d, ebx
mov dword [rbp + 0x6f], r15d
mov rdx, rsi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140026320
mov eax, dword [rbp + 0x6f]
add edi, eax
add rsi, rax
cmp edi, ebx
jb 0x1400262f0
add dword [0x14009bbd8], ebx
mov rsi, qword [rsp + 0x110]
jmp 0x140026363
add dword [0x14009bbd8], ebx
lea rdi, [rbp - 0x69]
nop word [rax + rax]
mov r9, qword [0x14009bba8]
mov edx, 1
mov r8d, ebx
mov rcx, rdi
call fcn.140058e40
movsxd rcx, eax
sub ebx, eax
add rdi, rcx
test ebx, ebx
jg 0x140026340
mov r15, qword [rsp + 0xe0]
lea rbx, [rbp - 0x21]
lea rdi, [rbp - 0x49]
nop dword [rax]
nop word [rax + rax]
mov eax, dword [rdi]
lea rcx, [rbp + 0x77]
mov edx, 4
mov dword [rbp + 0x77], eax
call fcn.140025590
mov edx, dword [rbp + 0x77]
mov rcx, qword [rbx]
call fcn.140025590
mov edx, 1
mov byte [rbp + 0x6f], 0
lea rcx, [rbp + 0x6f]
call fcn.140025590
lea rdi, [rdi + 4]
lea rbx, [rbx + 8]
sub r14, 1
jne 0x140026380
lea rcx, [0x14009bbb0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r14, qword [rsp + 0xe8]
mov rdi, qword [rsp + 0xf0]
add rsp, 0xf8
pop rbx
pop rbp
ret