Function at 0x140004180
Capabilities:
Write file on windows

Disassembly:
test rcx, rcx
je 0x14000441e
mov r11, rsp
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x20], r9
push rbp
push rdi
push r12
lea rbp, [r11 - 0x48]
sub rsp, 0x130
mov rax, qword [0x140098180]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov qword [r11 - 0x20], rbx
mov r12d, edx
mov qword [r11 - 0x28], rsi
mov rdi, rcx
mov qword [r11 - 0x30], r13
mov qword [r11 - 0x38], r14
mov qword [r11 - 0x40], r15
mov r15d, dword [rcx + 0x1c]
mov r14d, r15d
mov esi, r15d
shr r14d, 1
shr esi, 3
and r14b, 1
and sil, 1
shr r15d, 2
and r15b, 1
je 0x1400041fb
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r8, qword [rbp + 0x60]
lea r9, [rbp + 0x68]
mov edx, 0x800
lea rcx, [0x140098d30]
call fcn.140003970
xor ebx, ebx
mov r13d, eax
mov r10d, ebx
mov edx, r12d
test r12d, r12d
je 0x14000424a
sub edx, 1
je 0x140004241
sub edx, 1
je 0x140004238
cmp edx, 1
jne 0x140004251
lea r10, str._x_
jmp 0x140004251
lea r10, [0x14008b8a4]
jmp 0x140004251
lea r10, str._i_
jmp 0x140004251
lea r10, str._d_
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400043a4
test r10, r10
je 0x140004282
mov rcx, qword [rcx]
lea r9, [rsp + 0x50]
mov r8d, 4
mov dword [rsp + 0x50], ebx
mov rdx, r10
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test sil, sil
je 0x1400042cb
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea r8, str.0x_08X
mov edx, 0x40
mov r9d, eax
lea rcx, [rsp + 0x70]
call fcn.140003ba0
mov rcx, qword [rdi]
lea r9, [rsp + 0x50]
mov r8d, 0xb
mov dword [rsp + 0x50], ebx
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x20], rbx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test r14b, r14b
je 0x140004376
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [rsp + 0x64]
movzx edx, word [rsp + 0x62]
movzx r8d, word [rsp + 0x60]
movzx eax, word [rsp + 0x66]
movzx r10d, word [rsp + 0x5e]
movzx r11d, word [rsp + 0x5a]
movzx r9d, word [rsp + 0x58]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ecx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x38], edx
mov edx, 0x80
mov dword [rsp + 0x30], r8d
lea r8, str._04u__02u__02u__02u:_02u:_02u._03u
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call fcn.140003ba0
mov eax, 0x7fffffff
lea r8, [rsp + 0x70]
cmp byte [r8], bl
je 0x14000434f
inc r8
dec eax
test eax, eax
jg 0x140004341
mov rcx, qword [rdi]
lea rax, [rsp + 0x70]
sub r8d, eax
mov dword [rsp + 0x50], ebx
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rbx
lea rdx, [rsp + 0x70]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rdi]
lea r9, [rsp + 0x50]
mov r8d, 0x7ff
mov dword [rsp + 0x50], ebx
cmp r13d, r8d
mov qword [rsp + 0x20], rbx
lea rdx, [0x140098d30]
mov rcx, qword [rcx]
cmovl r8d, r13d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rdi + 0x18]
mov r14, qword [rsp + 0x110]
mov r13, qword [rsp + 0x118]
test eax, eax
je 0x1400043e0
mov esi, eax
nop dword [rax]
mov rax, qword [rdi + 0x10]
lea r8, [0x140098d30]
mov edx, r12d
mov rcx, qword [rbx + rax]
call qword [rbx + rax + 8]
lea rbx, [rbx + 0x10]
sub rsi, 1
jne 0x1400043c0
mov rsi, qword [rsp + 0x120]
test r15b, r15b
mov r15, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x128]
je 0x140004407
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14007b230
add rsp, 0x130
pop r12
pop rdi
pop rbp
ret