Function at 0x140008880
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x4b0]
sub rsp, 0x5b0
mov rdi, r8
mov esi, edx
test rcx, rcx
jne 0x1400088a7
mov edi, 0x10000
jmp 0x140008c1d
cmp dword [rcx], 1
je 0x1400088c6
mov dword [0x14007e590], 0x80000
mov eax, 0x80000
add rsp, 0x5b0
pop rdi
pop rsi
pop rbp
ret
mov qword [rsp + 0x5d8], rbx
mov rbx, qword [rcx + 8]
cmp dword [rbx + 8], 0xffffffff
je 0x1400088e0
mov rcx, qword [rbx]
call fcn.1400060a0
mov rcx, qword [rbx]
mov dword [rbx + 8], 0xffffffff
cmp esi, dword [rcx + 8]
jl 0x1400088f9
mov edi, 0x10000
jmp 0x140008c15
cmp esi, dword [rcx + 0x14]
jge 0x140008903
call fcn.140005ce0
mov rax, qword [rbx]
cmp dword [rax + 0x14], esi
jge 0x140008920
nop dword [rax + rax]
mov rcx, qword [rbx]
call fcn.140005d40
mov rdx, qword [rbx]
cmp dword [rdx + 0x14], esi
jl 0x140008910
lea r8, [rbp + 0x50]
mov edx, esi
mov rcx, rbx
call fcn.1400062a0
test byte [rbp + 0x158], 0x10
movzx eax, byte [rdi]
je 0x140008973
cmp al, 0x2f
je 0x140008962
cmp al, 0x5c
je 0x140008962
test al, al
je 0x14000894c
cmp byte [rdi + 1], 0x3a
je 0x140008962
lea rcx, [rbx + 0x150]
mov rdx, rdi
call fcn.140006890
xor edi, edi
jmp 0x140008c15
xor ecx, ecx
mov rdx, rdi
call fcn.140006890
xor edi, edi
jmp 0x140008c15
mov qword [rsp + 0x5e0], r12
mov r9, rdi
mov rcx, rdi
test al, al
je 0x14000899c
cmp al, 0x2f
je 0x14000898d
cmp al, 0x5c
jne 0x140008991
lea r9, [rcx + 1]
movzx eax, byte [rcx + 1]
inc rcx
test al, al
jne 0x140008985
lea rdx, [rsp + 0x40]
mov rcx, rdi
sub rdx, rdi
nop word [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx + rcx - 1], al
test al, al
jne 0x1400089b0
cmp r9, rdi
jne 0x1400089c9
mov byte [rsp + 0x40], al
jmp 0x1400089ec
mov rax, r9
sub rax, rdi
mov byte [rsp + rax + 0x40], 0
movzx eax, byte [rsp + 0x40]
cmp al, 0x2f
je 0x140008a27
cmp al, 0x5c
je 0x140008a27
test al, al
je 0x1400089ec
cmp byte [rsp + 0x41], 0x3a
je 0x140008a27
mov qword [rsp + 0x20], r9
lea r8, [rbx + 0x150]
lea rdx, [0x14006480c]
lea r9, [rsp + 0x40]
lea rcx, [rbp + 0x3a0]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x40]
lea rcx, [rbx + 0x150]
call fcn.140006890
jmp 0x140008b00
lea r8, [rsp + 0x40]
lea rdx, str._s_s
lea rcx, [rbp + 0x3a0]
call qword [sym.imp.USER32.dll_wsprintfA]
movzx edx, byte [rsp + 0x40]
test dl, dl
je 0x140008b00
lea rdi, [rsp + 0x40]
lea rax, [rsp + 0x40]
cmp dl, 0x2f
je 0x140008a61
cmp dl, 0x5c
jne 0x140008a64
mov rdi, rax
movzx edx, byte [rax + 1]
inc rax
test dl, dl
jne 0x140008a57
lea rax, [rsp + 0x40]
cmp rdi, rax
je 0x140008aab
lea rax, [rsp + 0x40]
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x290]
sub rdi, rax
mov r8, rdi
call fcn.140046e50
lea rdx, [rbp + 0x290]
xor ecx, ecx
mov byte [rbp + rdi + 0x290], 0
call fcn.140006890
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x180]
mov byte [rbp + 0x180], 0
repne scasb al, byte [rdi]
lea rdx, [rsp + 0x40]
xor ecx, ecx
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x140008ad0
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140008b00
lea rcx, [rbp + 0x180]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [rbp + 0x158]
xor edi, edi
lea rcx, [rbp + 0x3a0]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], eax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x140008b44
mov edi, 0x200
jmp 0x140008c0d
mov rdx, qword [rbx + 0x140]
mov rcx, qword [rbx]
call fcn.140008150
cmp qword [rbx + 0x148], rdi
jne 0x140008b70
mov ecx, 0x4000
call fcn.140047484
mov qword [rbx + 0x148], rax
nop dword [rax]
mov rdx, qword [rbx + 0x148]
mov rcx, qword [rbx]
lea r9, [rbp + 0x4d0]
mov r8d, 0x4000
call fcn.140008370
mov esi, eax
cmp eax, 0xffffff96
je 0x140008bf7
test eax, eax
js 0x140008bc9
jle 0x140008bbc
mov rdx, qword [rbx + 0x148]
lea r9, [rbp + 0x4e8]
mov r8d, eax
mov rcx, r12
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140008bd0
cmp byte [rbp + 0x4d0], dil
jne 0x140008bd7
test esi, esi
jne 0x140008b70
mov edi, 0x5000000
jmp 0x140008bfc
mov edi, 0x400
jmp 0x140008bfc
lea r9, [rbp + 0x16c]
lea r8, [rbp + 0x15c]
lea rdx, [rbp + 0x164]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x140008bfc
mov edi, 0x1000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx]
call fcn.1400060a0
mov r12, qword [rsp + 0x5e0]
mov rbx, qword [rsp + 0x5d8]
mov eax, edi
mov dword [0x14007e590], edi
add rsp, 0x5b0
pop rdi
pop rsi
pop rbp
ret