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

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x19b0]
mov eax, 0x1ab0
call fcn.1400abe60
sub rsp, rax
mov dword [rbp + 0x19d0], 0
mov rbx, rcx
test rcx, rcx
je 0x140014865
lea rdx, [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
test eax, eax
jne 0x140014865
lea rdx, [0x1400aced8]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
test rax, rax
je 0x140014865
lea r9, [rbp + 0x19d0]
mov rdx, rax
mov rcx, rbx
call fcn.140049470
mov rdi, rax
test rax, rax
je 0x140014865
mov qword [rsp + 0x1aa8], rsi
xor ebx, ebx
lea rsi, [rax + 0x50]
mov qword [rsp + 0x1aa0], r12
mov rax, qword [rsi]
mov qword [rsp + 0x1a98], r13
mov qword [rsp + 0x1a90], r14
mov qword [rsp + 0x1a88], r15
mov dword [rbp + 0x19d0], ebx
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rax
test rax, rax
jle 0x140014856
mov r13d, dword [rbp + 0x19d0]
lea rcx, [rdi + 0x30]
movzx r12d, byte [rbp + 0x19d0]
xor r14d, r14d
mov qword [rbp + 0x19e0], r14
xor eax, eax
mov qword [rsp + 0x40], rcx
mov qword [rbp + 0x19e8], rdi
mov r9, qword [rcx]
mov rdx, rax
mov rcx, rdi
call fcn.14004df10
mov r15, rax
test rax, rax
je 0x1400147ef
lea rbx, [rdi + 0x18]
cmp r14, qword [rsi]
jb 0x140014163
test rbx, rbx
je 0x14001419f
mov qword [rbx], reloc.WS2_32.dll_select
jmp 0x14001419f
mov rdx, qword [rdi + 0x60]
mov rcx, r14
shl rcx, 5
mov rax, qword [rdx + rcx + 8]
test rax, rax
jne 0x140014196
mov rax, qword [rdx + rcx]
test rax, rax
je 0x140014155
cmp dword [rdx + rcx + 0x18], 0
je 0x140014196
test rbx, rbx
je 0x14001419f
mov qword [rbx], reloc.WS2_32.dll_socket
jmp 0x14001419f
movzx r12d, byte [rax + 0xd]
mov r13d, dword [rax + 0x58]
cmp r14, qword [rsi]
jb 0x1400141b9
test rbx, rbx
je 0x140014243
mov qword [rbx], reloc.WS2_32.dll_select
jmp 0x140014243
mov rax, qword [rdi + 0x60]
mov rcx, r14
shl rcx, 5
mov rdi, qword [rax + rcx + 8]
test rdi, rdi
jne 0x1400141ec
mov rdi, qword [rax + rcx]
test rdi, rdi
je 0x1400141a4
cmp dword [rax + rcx + 0x18], 0
je 0x1400141ec
test rbx, rbx
je 0x140014243
mov qword [rbx], reloc.WS2_32.dll_socket
jmp 0x140014243
mov rdi, qword [rdi + 0x38]
test rdi, rdi
jne 0x1400141fe
lea rax, [0x1400ae139]
jmp 0x140014245
cmp dword [rdi + 0xc], 0
jne 0x14001420e
xor edx, edx
mov rcx, rdi
call fcn.14004e7f0
cmp dword [rdi + 0xc], 4
jne 0x14001423b
mov rax, qword [rdi + 0x10]
test rax, rax
jne 0x140014245
movzx edx, word [rdi + 8]
lea r8, [rdi + 0x18]
mov rcx, qword [rdi]
mov r9, rbx
call fcn.14004e930
mov qword [rdi + 0x10], rax
test rax, rax
je 0x140014243
jmp 0x140014245
mov rax, qword [rdi]
test rax, rax
jne 0x140014245
xor eax, eax
mov r8, qword [rbp + 0x19d8]
lea rdx, [0x14014892c]
mov r9, rax
lea rcx, [rbp - 0x80]
call fcn.14000e090
movzx ecx, byte [rbp - 0x80]
lea rax, [rbp - 0x80]
test cl, cl
je 0x140014288
nop dword [rax + rax]
cmp cl, 0x2f
je 0x14001427a
cmp byte [rax], 0x5c
jne 0x14001427d
mov byte [rax], 0x2f
movzx ecx, byte [rax + 1]
inc rax
test cl, cl
jne 0x140014270
lea rbx, [rbp - 0x80]
mov rsi, 0xffffffffffffffff
lea rax, [rbp - 0x80]
inc rsi
cmp byte [rax + rsi], 0
jne 0x140014297
lea rdx, [0x1400ad488]
lea rcx, [rbp - 0x80]
call qword [sym.imp.VCRUNTIME140.dll_strstr]
nop dword [rax]
nop word [rax + rax]
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rax + rcx], 0
jne 0x1400142c7
mov edx, 1
mov rax, 0xffffffffffffffff
sub rdx, rcx
nop
inc rax
cmp byte [rbx + rax], 0
jne 0x1400142e0
add rbx, rax
add rbx, rdx
lea rdx, [0x1400ad488]
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x1400142c0
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rbx + r8], 0
jne 0x140014310
mov rdx, rbx
lea rcx, [rbp + 0x380]
call sub.VCRUNTIME140.dll_memcpy
mov rax, 0xffffffffffffffff
cmp byte [rbx + rax + 1], 0
lea rax, [rax + 1]
jne 0x140014330
mov byte [rbp + rax + 0x380], 0
lea rcx, [rbp + 0x380]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140014351
mov rdi, rsi
mov rdx, 0xffffffffffffffff
sub rdi, rax
inc rdx
cmp byte [rbx + rdx], 0
jne 0x140014367
sub rbx, rsi
lea rcx, [rbp + 0x180]
add rdx, rbx
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
lea rdx, [rsp + 0x48]
mov byte [rbp + rdi + 0x180], 0
lea rcx, [rbp + 0x180]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
test eax, eax
je 0x140014440
lea rcx, [rbp + 0x180]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x1400143b5
sub eax, 1
movsxd rcx, eax
js 0x1400143ea
nop word [rax + rax]
movzx edx, byte [rbp + rcx + 0x180]
cmp dl, 0x2f
je 0x1400143ea
cmp dl, 0x5c
je 0x1400143ea
dec eax
sub rcx, 1
jns 0x1400143d0
test eax, eax
jle 0x140014433
movsxd rbx, eax
lea rdx, [rbp + 0x180]
mov r8, rbx
lea rcx, [rbp + 0x580]
call sub.VCRUNTIME140.dll_memcpy
cmp byte [rbp + rbx + 0x57f], 0x3a
mov byte [rbp + rbx + 0x580], 0
jne 0x140014423
mov word [rbp + rbx + 0x580], 0x2f
lea rcx, [rbp + 0x580]
call fcn.14000ca70
test eax, eax
je 0x140014440
lea rcx, [rbp + 0x180]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir]
test r12b, r12b
jne 0x140014450
mov ecx, r13d
shr ecx, 0xa
and ecx, 1
jmp 0x14001446c
cmp r12b, 3
jne 0x140014590
xor ecx, ecx
mov eax, r13d
and eax, 0xa0000000
cmp eax, 0xa0000000
sete cl
test ecx, ecx
je 0x14001456c
cmp dword [r15 + 8], 0
je 0x140014487
mov rbx, 0xffffffffffffffff
jmp 0x140014521
cmp dword [r15 + 0x18], 0
jne 0x14001451f
mov rdi, qword [r15 + 0x20]
cmp dword [rdi + 0x1c], 0
je 0x140014502
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
mov r10, qword [rdi + 8]
test rcx, rcx
jne 0x1400144cf
mov r9d, 1
lea rdx, [rbp + 0x980]
mov r8d, 0x1000
mov rcx, rax
call r10
mov rbx, rax
test rax, rax
jns 0x140014521
jmp 0x140014509
mov r9d, 0x1000
mov dword [rsp + 0x20], 1
lea r8, [rbp + 0x980]
mov rdx, rax
call r10
mov rbx, rax
test rax, rax
jns 0x140014521
xor eax, eax
cmp rbx, 0xfffffffffffffffe
sete al
inc eax
mov dword [rdi + 0x18], eax
jmp 0x140014509
mov dword [rdi + 0x18], 3
mov rdx, qword [r15 + 0x20]
lea rcx, [r15 + 8]
call fcn.14004a880
mov rbx, 0xffffffffffffffff
jmp 0x140014521
xor ebx, ebx
lea rdx, [0x1400acc64]
mov byte [rbp + rbx + 0x980], 0
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
je 0x140014815
mov r9, rax
lea rcx, [rbp + 0x980]
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14001472d
test r12b, r12b
jne 0x140014579
mov eax, r13d
shr eax, 4
jmp 0x140014585
cmp r12b, 3
jne 0x140014590
mov eax, r13d
shr eax, 0x1e
and eax, 1
test eax, eax
jne 0x14001472d
lea rcx, [rbp + 0x380]
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x1400145a0
test rax, rax
je 0x14001472d
mov edx, 0x1b6
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chmod]
lea rdx, [0x1400acc64]
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov r14, rax
test rax, rax
je 0x140014841
nop
cmp dword [r15 + 8], 0
jne 0x1400146a5
cmp dword [r15 + 0x18], 0
jne 0x140014636
mov rdi, qword [r15 + 0x20]
cmp dword [rdi + 0x1c], 0
je 0x140014691
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
mov r10, qword [rdi + 8]
test rcx, rcx
jne 0x14001465e
mov r9d, 1
lea rdx, [rbp + 0x980]
mov r8d, 0x1000
mov rcx, rax
call r10
mov rbx, rax
test rax, rax
js 0x140014698
test rbx, rbx
jne 0x1400146ac
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, [rbp - 0x80]
cmp r12b, 3
jne 0x14001471b
mov edx, r13d
shr edx, 0x10
and edx, 0xffffff6d
jmp 0x140014720
mov r9d, 0x1000
mov dword [rsp + 0x20], 1
lea r8, [rbp + 0x980]
mov rdx, rax
call r10
mov rbx, rax
test rax, rax
jns 0x140014631
xor eax, eax
cmp rbx, 0xfffffffffffffffe
sete al
inc eax
mov dword [rdi + 0x18], eax
jmp 0x140014698
mov dword [rdi + 0x18], 3
mov rdx, qword [r15 + 0x20]
lea rcx, [r15 + 8]
call fcn.14004a880
mov rbx, 0xffffffffffffffff
mov r9, r14
lea rcx, [rbp + 0x980]
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, rbx
je 0x1400145e0
mov r9d, ebx
lea rdx, [rbp - 0x80]
mov r8d, eax
lea rcx, str.__Writing_data_to__s_failed_n____d_bytes_were_written_n_____d_bytes_were_attempted_to_be_written_n____File_may_be_corrupt_n
call fcn.140010a50
mov eax, 0xffffffff
mov r14, qword [rsp + 0x1a90]
mov r13, qword [rsp + 0x1a98]
mov r12, qword [rsp + 0x1aa0]
mov r15, qword [rsp + 0x1a88]
mov rsi, qword [rsp + 0x1aa8]
add rsp, 0x1ab0
pop rdi
pop rbx
pop rbp
ret
mov edx, 0x124
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chmod]
mov r14, qword [rbp + 0x19e0]
mov rbx, qword [r15 + 0x20]
test rbx, rbx
je 0x140014789
cmp dword [rbx + 0x1c], 0
je 0x140014744
mov rcx, rbx
call fcn.14004a940
mov rcx, qword [rbx]
xor r8d, r8d
mov rax, qword [rbx + 0x10]
mov r10, qword [rbx + 8]
test rcx, rcx
jne 0x140014767
mov r9d, 5
xor edx, edx
mov rcx, rax
call r10
jmp 0x140014780
xor r9d, r9d
mov dword [rsp + 0x20], 5
mov rdx, rax
call r10
mov rcx, qword [rbx]
call fcn.14004a750
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [r15]
test rax, rax
je 0x1400147c2
mov edx, dword [rax + 0x68]
xor ecx, ecx
test edx, edx
je 0x1400147c2
mov r9, qword [rax + 0x70]
nop
cmp qword [r9 + rcx*8], r15
lea r8, [r9 + rcx*8]
je 0x1400147b2
inc ecx
cmp ecx, edx
jb 0x1400147a0
jmp 0x1400147c2
lea ecx, [rdx - 1]
mov rcx, qword [r9 + rcx*8]
mov qword [r8], rcx
mov rax, qword [r15]
dec dword [rax + 0x68]
mov rcx, qword [r15 + 0x10]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r15
mov qword [r15 + 0x10], 0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [rbp + 0x19e8]
mov ebx, dword [rbp + 0x19d0]
mov rsi, qword [rsp + 0x30]
inc ebx
inc r14
movsxd rax, ebx
mov dword [rbp + 0x19d0], ebx
mov qword [rbp + 0x19e0], r14
cmp rax, qword [rsp + 0x38]
jge 0x140014856
mov rcx, qword [rsp + 0x40]
jmp 0x140014132
lea rdx, [rbp - 0x80]
lea rcx, str.Error_creating_file:_n___s_n
call fcn.140010a50
lea r8, [rbp + 0x980]
lea rdx, [rbp - 0x80]
lea rcx, str.__Failed_to_create_symbolic_link___s___s__n
call fcn.140010a50
jmp 0x1400146e3
lea rdx, [rbp - 0x80]
lea rcx, str.Error_creating_file:_n___s_n
call fcn.140010a50
jmp 0x1400146e3
mov rcx, rdi
call fcn.140047ef0
xor eax, eax
jmp 0x1400146e8
mov rdx, rbx
lea rcx, str._s_does_not_exist_n
call fcn.140010a50
mov eax, 0xffffffff
add rsp, 0x1ab0
pop rdi
pop rbx
pop rbp
ret