Function at 0x140093318
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
xor edi, edi
lea rdx, [rcx + 0x10]
and dword [rbp + 0x40], edi
or r12, 0xffffffffffffffff
and dword [rbp + 0x50], edi
mov rax, rcx
and dword [rbp + 0x48], edi
mov rsi, rcx
neg rax
sbb rbx, rbx
and rbx, rdx
lea r15, [rbx + 8]
je 0x140093361
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop dword [rax + rax]
cmp dword [rsi + 0x100], edi
jne 0x140093373
mov edi, 0x802a0035
jmp 0x140093560
mov rcx, qword [rsi + 0xf8]
test rcx, rcx
jne 0x14009339d
test rbx, rbx
je 0x140093393
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov eax, 0x80004005
jmp 0x140093585
cmp dword [rsi + 0x104], edi
jne 0x140093560
and qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
lea edi, [r9 + 1]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x140093420
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
je 0x140093416
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jle 0x140093560
movzx edi, ax
or edi, 0x80070000
jmp 0x140093560
mov edi, 0x8000ffff
jmp 0x140093560
mov rax, qword [rsi]
movabs r10, 0xb9302e0230512270
mov rax, qword [rax + 0x28]
lea rdx, [rbp + 0x48]
mov rcx, rsi
call qword [case.0x140063541.0]
mov edx, edi
mov rcx, rsi
call fcn.1400941ec
mov edi, eax
test eax, eax
js 0x140093560
jmp 0x1400934b4
mov edx, dword [rsi + 0xd4]
lea r9, [rbp + 0x50]
add rdx, qword [rsi + 0xc8]
mov r8d, r14d
and qword [rsp + 0x20], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x1400934a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jle 0x14009349c
movzx edi, ax
or edi, 0x80070000
test edi, edi
js 0x140093560
add dword [rsi + 0xd8], r14d
mov eax, dword [rbp + 0x50]
add dword [rsi + 0xd4], eax
lea rdx, [rbp + 0x40]
mov rcx, rsi
call fcn.140094290
mov r14d, dword [rbp + 0x40]
test r14d, r14d
jne 0x140093454
mov eax, dword [rsi + 0x54]
cmp dword [rsi + 0xd8], eax
je 0x1400934de
mov edi, 0x802a0021
jmp 0x140093560
xor edx, edx
mov rcx, rsi
call fcn.1400941ec
mov edi, eax
test eax, eax
js 0x140093560
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov eax, dword [rbp + 0x48]
lea r14, [rsi + 0xf0]
mov rcx, qword [rsi + 0xf8]
mov rdx, r14
or r12, 0xffffffffffffffff
mov dword [rbp + 0x58], eax
call fcn.14008e0c0
mov edi, eax
test eax, eax
js 0x140093560
mov rcx, qword [r14]
mov rax, qword [rcx]
movabs r10, 0xfdc5aee55c52c070
mov rax, qword [rax + 0x20]
lea rdx, [rbp + 0x58]
call qword [case.0x140063541.0]
mov edi, eax
test eax, eax
js 0x140093560
mov eax, dword [rbp + 0x48]
cmp dword [rbp + 0x58], eax
jne 0x14009355b
mov dword [rsi + 0x104], 1
jmp 0x140093560
mov edi, 0x80004005
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
test rbx, rbx
je 0x140093583
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov eax, edi
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret