Function at 0x140024740
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x4f]
sub rsp, 0xf8
cmp qword [0x140099928], 0
mov rbx, rcx
jne 0x140024769
cmp byte [0x140099fd8], 0
je 0x1400249bb
mov qword [rsp + 0xf0], rdi
lea rcx, [0x140099930]
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 [0x14009995c]
add r9d, 0x24
mov rcx, qword [rax]
mov rax, qword [rcx + 8]
mov ecx, dword [rax + 0xa8]
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 0x1400247f0
mov edx, r15d
mov dword [rbp - 0x49], r15d
mov eax, r15d
jmp 0x140024802
mov rdx, rcx
inc rdx
cmp byte [r8 + rdx], r15b
jne 0x1400247f3
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 0x140024825
mov ecx, r15d
mov dword [rbp - 0x45], r15d
mov eax, r15d
jmp 0x140024835
inc rcx
cmp byte [rdx + rcx], r15b
jne 0x140024825
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 0x140024870
lea eax, [rdx + 0x24]
mov dword [rbp - 0x75], 6
mov dword [rbp - 0x79], eax
lea edx, [r8 + 0xc]
mov eax, dword [0x140099958]
lea rcx, [rbp - 0x79]
mov dword [rbp - 0x71], eax
inc eax
mov dword [0x140099958], eax
call fcn.140023c60
cmp byte [0x140099fd8], r15b
mov ebx, 0x18
je 0x140024910
mov qword [rsp + 0x110], rsi
mov edi, r15d
lea rsi, [rbp - 0x69]
nop word [rax + rax]
mov rcx, qword [0x1400cf100]
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 0x140024900
mov eax, dword [rbp + 0x6f]
add edi, eax
add rsi, rax
cmp edi, ebx
jb 0x1400248d0
add dword [0x14009995c], ebx
mov rsi, qword [rsp + 0x110]
jmp 0x140024943
add dword [0x14009995c], ebx
lea rdi, [rbp - 0x69]
nop word [rax + rax]
mov r9, qword [0x140099928]
mov edx, 1
mov r8d, ebx
mov rcx, rdi
call fcn.1400570cc
movsxd rcx, eax
sub ebx, eax
add rdi, rcx
test ebx, ebx
jg 0x140024920
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.140023c60
mov edx, dword [rbp + 0x77]
mov rcx, qword [rbx]
call fcn.140023c60
mov edx, 1
mov byte [rbp + 0x6f], 0
lea rcx, [rbp + 0x6f]
call fcn.140023c60
lea rdi, [rdi + 4]
lea rbx, [rbx + 8]
sub r14, 1
jne 0x140024960
mov r14, qword [rsp + 0xe8]
lea rcx, [0x140099930]
mov rdi, qword [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0xf8
pop rbx
pop rbp
ret