Function at 0x140020300
Capabilities:
Create directory
Write file on windows

Disassembly:
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x60
mov rsi, rdx
mov r13d, 1
mov edx, r13d
mov r15d, r9d
mov r14, r8
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1400207c6
cmp qword [rdi + 0x38], 0xffffffffffffffff
je 0x1400207c6
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0xa0], r12
xor r12d, r12d
mov dword [rdi + 0x10], r12d
test r13b, r15b
je 0x1400203eb
cmp word [rdi + 0x80], r12w
jne 0x14002038a
mov rdx, r14
mov rcx, rdi
call fcn.14001f720
cmp dword [rdi + 0x10], r12d
jne 0x1400207b6
mov word [rdi + 0x80], r13w
mov r8, qword [r14 + 0x28]
mov rdx, rsi
mov rcx, rdi
call fcn.14001fad0
mov qword [r14 + 0x28], rax
cmp dword [rdi + 0x10], r12d
jne 0x1400203d6
cmp qword [rdi + 0xf8], r12
je 0x1400203d6
mov eax, 5
mov rbp, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x90]
mov r12, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret
mov rcx, rdi
mov word [rdi + 0x80], r12w
call fcn.14001f5c0
mov eax, dword [rdi + 0x10]
jmp 0x1400203b1
test byte [r14 + 8], 0x10
je 0x14002057b
test r15b, 2
je 0x1400204a8
mov dword [rsp + 0x48], reloc.OLEAUT32.dll_SafeArrayGetElement
mov rcx, rsi
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x58], r13d
test r15d, r15d
jns 0x1400204d5
movzx eax, word [rsi]
test ax, ax
je 0x140020435
cmp word [rsi + 2], 0x3a
jne 0x140020435
movzx eax, word [rsi + 4]
lea rcx, [rsi + 4]
movzx edx, ax
cmp ax, 0x5c
jne 0x140020442
movzx edx, word [rcx + 2]
lea rbx, [rcx + 2]
cmovne rbx, rcx
test dx, dx
je 0x1400204a8
movzx eax, word [rbx]
mov ebp, 0x5c
test ax, ax
je 0x140020472
nop dword [rax]
cmp ax, bp
je 0x1400204af
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x140020460
mov rbx, r12
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140020494
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400204b5
test rbx, rbx
je 0x1400204a8
mov word [rbx], bp
add rbx, 2
movzx eax, word [rbx]
test ax, ax
jne 0x140020460
xor eax, eax
jmp 0x1400203b1
mov word [rbx], r12w
jmp 0x140020475
test rbx, rbx
je 0x1400206ee
mov word [rbx], bp
mov rcx, rdi
mov dword [rdi + 0x10], r13d
call fcn.14001f5c0
mov eax, dword [rdi + 0x10]
jmp 0x1400203b1
movzx eax, byte [rsi]
test al, al
je 0x1400204ea
cmp byte [rsi + 1], 0x3a
jne 0x1400204ea
movzx eax, byte [rsi + 2]
lea rcx, [rsi + 2]
movzx edx, al
cmp al, 0x5c
jne 0x1400204f5
movzx edx, byte [rcx + 1]
lea rbx, [rcx + 1]
cmovne rbx, rcx
test dl, dl
je 0x1400204a8
movzx eax, byte [rbx]
test al, al
je 0x140020517
cmp al, 0x5c
je 0x140020556
movzx eax, byte [rbx + 1]
inc rbx
test al, al
jne 0x140020508
mov rbx, r12
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140020539
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x14002055b
test rbx, rbx
je 0x1400204a8
mov byte [rbx], 0x5c
inc rbx
movzx eax, byte [rbx]
test al, al
jne 0x140020508
xor eax, eax
jmp 0x1400203b1
mov byte [rbx], r12b
jmp 0x14002051a
test rbx, rbx
je 0x1400206ee
mov byte [rbx], 0x5c
mov rcx, rdi
mov dword [rdi + 0x10], r13d
call fcn.14001f5c0
mov eax, dword [rdi + 0x10]
jmp 0x1400203b1
cmp r15d, 4
je 0x1400206e8
mov dword [rsp + 0x48], reloc.OLEAUT32.dll_SafeArrayGetElement
mov rcx, rsi
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x58], r13d
test r15d, r15d
jns 0x14002064d
movzx eax, word [rsi]
test ax, ax
je 0x1400205ba
cmp word [rsi + 2], 0x3a
jne 0x1400205ba
movzx eax, word [rsi + 4]
lea rcx, [rsi + 4]
movzx edx, ax
cmp ax, 0x5c
jne 0x1400205c7
movzx edx, word [rcx + 2]
lea rbx, [rcx + 2]
cmovne rbx, rcx
test dx, dx
je 0x1400205f3
movzx eax, word [rbx]
mov ebp, 0x5c
test ax, ax
je 0x1400205f3
cmp ax, bp
je 0x140020621
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x1400205e1
mov eax, dword [r14 + 8]
xor r9d, r9d
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov edx, 0x40000000
mov rcx, rsi
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x1400206e5
lea rdx, [rsp + 0x48]
mov word [rbx], r12w
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140020648
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400204be
mov word [rbx], bp
jmp 0x1400205e6
movzx eax, byte [rsi]
test al, al
je 0x140020662
cmp byte [rsi + 1], 0x3a
jne 0x140020662
movzx eax, byte [rsi + 2]
lea rcx, [rsi + 2]
movzx edx, al
cmp al, 0x5c
jne 0x14002066d
movzx edx, byte [rcx + 1]
lea rbx, [rcx + 1]
cmovne rbx, rcx
test dl, dl
je 0x1400206bc
movzx eax, byte [rbx]
test al, al
je 0x1400206bc
cmp al, 0x5c
je 0x140020689
inc rbx
jmp 0x1400206b5
lea rdx, [rsp + 0x48]
mov byte [rbx], r12b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1400206af
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140020564
mov byte [rbx], 0x5c
inc rbx
movzx eax, byte [rbx]
test al, al
jne 0x140020680
mov eax, dword [r14 + 8]
xor r9d, r9d
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov edx, 0x40000000
mov rcx, rsi
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rsi, 0xffffffffffffffff
jne 0x140020702
mov rcx, rdi
mov dword [rdi + 0x10], r13d
call fcn.14001f5c0
mov eax, dword [rdi + 0x10]
jmp 0x1400203b1
mov rdx, r14
mov rcx, rdi
call fcn.14001f720
cmp dword [rdi + 0x10], r12d
jne 0x1400207a7
cmp qword [rdi + 0x58], r12
jne 0x14002073a
mov edx, 0x4000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov qword [rdi + 0x58], rax
test rax, rax
jne 0x14002073a
mov dword [rdi + 0x10], 2
cmp dword [rdi + 0x10], r12d
jne 0x1400207a7
mov rdx, qword [rdi + 0x58]
mov r8d, 0x4000
mov rcx, rdi
call fcn.14001fad0
mov rbx, rax
test eax, eax
je 0x14002078c
mov rdx, qword [rdi + 0x58]
lea r9, [rsp + 0x40]
mov r8d, ebx
mov qword [rsp + 0x20], r12
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140020785
cmp dword [rsp + 0x40], ebx
jne 0x140020785
cmp dword [rdi + 0x10], r12d
je 0x140020740
jmp 0x14002078c
mov dword [rdi + 0x10], 3
cmp dword [rdi + 0x10], r12d
jne 0x1400207a7
lea r9, [r14 + 0x1c]
mov rcx, rsi
lea r8, [r14 + 0xc]
lea rdx, [r14 + 0x14]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
cmp r15d, 4
je 0x1400207b6
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.14001f5c0
mov eax, dword [rdi + 0x10]
jmp 0x1400203b1
mov eax, 9
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret