Function at 0x5138a0
Capabilities:
Create directory

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov dword [rdx], 0
lea rdi, [rsp + 0x40]
mov rbx, rdx
mov rbp, rcx
call fcn.004d6fb0
mov dword [rbx], 0
mov qword [rbx + 8], rax
call fcn.004d6fb0
mov dword [rsp + 0x30], 0
mov qword [rbx + 8], rax
call fcn.004d6fb0
mov r12, qword [rbp]
mov rsi, qword [rbp + 8]
mov qword [rsp + 0x38], rax
lea rax, [rdi + 0x10]
mov qword [rsp + 0x40], rax
mov rax, r12
add rax, rsi
je 0x513914
test r12, r12
jne 0x513914
lea rcx, [0x00816838]
call fcn.007cd620
cmp rsi, 0xf
mov qword [rsp + 0x60], rsi
ja 0x513a63
cmp rsi, 1
je 0x513bb3
lea rcx, [rdi + 0x10]
test rsi, rsi
lea r13, [rsp + 0x60]
jne 0x513a88
mov qword [rsp + 0x48], rsi
lea r8, [rsp + 0x30]
xor r9d, r9d
mov rdx, r13
mov byte [rcx + rsi], 0
mov rcx, rdi
call fcn.00512ee0
mov rcx, qword [rsp + 0x40]
add rdi, 0x10
cmp rcx, rdi
je 0x51396e
call fcn.007da050
mov edx, dword [rsp + 0x30]
test edx, edx
jne 0x513990
test byte [rsp + 0x85], 0x40
je 0x513990
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
mov qword [rbx + 8], rdx
mov qword [rbx], rax
call fcn.004d7020
mov dword [rsp + 0x60], 2
mov r9, qword [rbx + 8]
lea r8, [0x0070aa30]
mov qword [rsp + 0x68], rax
mov edx, dword [rbx]
mov rcx, qword [r9]
mov r10, qword [rcx + 0x28]
cmp r10, r8
jne 0x513c05
mov r10, qword [rcx + 0x20]
lea rcx, [0x0070aa70]
cmp r10, rcx
jne 0x513aa2
mov ecx, 2
cmp rax, r9
sete al
cmp edx, ecx
sete dl
and eax, edx
test al, al
je 0x513bd0
mov dword [rbx], 0
call fcn.004d6fb0
mov qword [rbx + 8], rax
cmp qword [rbp + 8], 0
jne 0x513ad0
mov dword [rbx], 0
call fcn.004d6fb0
mov rdx, rbp
mov rcx, r13
mov qword [rbx + 8], rax
call fcn.00602330
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x513c25
mov rcx, qword [rsp + 0x60]
add r13, 0x10
cmp rcx, r13
je 0x513980
call fcn.007da050
jmp 0x513980
lea r13, [rsp + 0x60]
mov rcx, rdi
xor r8d, r8d
mov rdx, r13
call fcn.0079cf60
mov rcx, rax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov r8, rsi
mov rdx, r12
call sub.msvcrt.dll_memcpy
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
jmp 0x51393f
lea rcx, [rsp + 0x20]
mov r8d, edx
mov rdx, r9
call r10
mov edx, dword [rsp + 0x20]
mov r9, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x60]
mov rax, qword [rsp + 0x68]
jmp 0x5139e9
lea rdx, [0x008168ca]
mov rcx, rbp
call fcn.007160d0
test eax, eax
je 0x513980
mov rcx, rbp
call fcn.005119b0
test al, al
jne 0x513980
cmp qword [rbp + 8], 0
je 0x513a18
lea rdx, [0x008168ca]
mov rcx, rbp
call fcn.007160d0
test eax, eax
je 0x513a18
mov rcx, rbp
call fcn.005119b0
test al, al
jne 0x513a18
mov eax, dword [rbp + 8]
mov rcx, qword [rbp]
sub eax, 1
movsxd rdx, eax
movzx edx, byte [rcx + rdx]
cmp dl, 0x2f
je 0x513c4e
cmp dl, 0x5c
je 0x513c4e
test eax, eax
js 0x513a18
sub eax, 1
cdqe
nop dword [rax]
cmp eax, 0xffffffff
je 0x513a18
movzx edx, byte [rcx + rax]
sub rax, 1
cmp dl, 0x2f
je 0x513b7b
cmp dl, 0x5c
jne 0x513b60
mov rdx, rbp
mov rcx, r13
call fcn.00512540
mov rdx, rbx
mov rcx, r13
call fcn.005138a0
mov rcx, qword [rsp + 0x60]
lea rax, [r13 + 0x10]
cmp rcx, rax
je 0x513ba4
call fcn.007da050
mov eax, dword [rbx]
test eax, eax
jne 0x513980
jmp 0x513a18
movzx eax, byte [r12]
lea rcx, [rdi + 0x10]
lea r13, [rsp + 0x60]
mov byte [rsp + 0x50], al
jmp 0x51393f
mov rcx, qword [rsp + 0x68]
lea rdx, [0x0070aa10]
mov r8d, dword [rsp + 0x60]
mov rax, qword [rcx]
mov rax, qword [rax + 0x30]
cmp rax, rdx
jne 0x513c13
cmp rcx, qword [rbx + 8]
jne 0x513980
cmp r8d, dword [rbx]
jne 0x513980
jmp 0x5139fe
mov r8, r13
mov rcx, r9
call r10
jmp 0x5139f6
mov rdx, rbx
call rax
test al, al
jne 0x5139fe
jmp 0x513980
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
cmp eax, 0xb7
je 0x513a47
call fcn.004d6fb0
mov rdi, rax
call rsi
mov dword [rbx], eax
mov qword [rbx + 8], rdi
jmp 0x513a47
sub eax, 1
js 0x513a18
movsxd rdx, eax
movzx edx, byte [rcx + rdx]
cmp dl, 0x2f
je 0x513b7b
cmp dl, 0x5c
je 0x513b7b
jmp 0x513b54