Function at 0x140004870
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x10], rdx
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x20
mov rdi, rcx
call fcn.1400014bc
xor r15d, r15d
mov rcx, rax
test rax, rax
je 0x140004ad3
mov rax, qword [rax]
call qword [rax + 0x18]
lea ecx, [r15 + 1]
mov edx, 0x104
lea rbx, [rax + 0x18]
mov eax, dword [rbx - 0xc]
sub ecx, dword [rbx - 8]
sub eax, edx
or ecx, eax
mov qword [rbp + 0x38], rbx
jge 0x1400048d5
lea rcx, [rbp + 0x38]
call fcn.140001ac4
mov rbx, qword [rbp + 0x38]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
sete dil
test rbx, rbx
jne 0x1400048f1
mov eax, r15d
jmp 0x140004905
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.14002ba48
test eax, eax
js 0x140004ade
cmp eax, dword [rbx - 0xc]
jg 0x140004ade
mov dword [rbx - 0x10], eax
or r12d, 0xffffffff
cdqe
mov word [rbx + rax*2], r15w
test dil, dil
je 0x14000492b
mov esi, 0x80004005
jmp 0x140004a9d
lea rcx, [rbp + 0x38]
call fcn.140005234
mov rbx, qword [rbp + 0x38]
lea r14, [rbx - 0x10]
cmp dword [r14], r15d
jle 0x140004974
movzx ecx, word [rbx]
mov rsi, rbx
test cx, cx
je 0x140004961
cmp cx, 0x5c
je 0x14000496f
add rsi, 2
movzx ecx, word [rsi]
test cx, cx
jne 0x14000494c
mov ecx, r15d
cmp cx, 0x5c
mov rax, r15
cmove rax, rsi
mov rsi, rax
test rsi, rsi
jne 0x140004979
mov esi, r12d
jmp 0x14000497f
sub rsi, rbx
sar rsi, 1
cmp esi, r12d
jne 0x140004989
mov r8d, dword [r14]
jmp 0x14000498c
mov r8d, esi
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x38]
call fcn.14000511c
mov rdi, qword [rbp + 0x40]
mov rcx, rdi
call fcn.140006658
test al, al
jne 0x1400049ce
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1400049ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x1400049ce
cmp eax, 0xb7
jne 0x140004a4e
cmp esi, r12d
je 0x140004a7a
lea eax, [rsi + 1]
test eax, eax
js 0x140004a26
cmp eax, dword [r14]
jge 0x140004a26
cdqe
lea rsi, [rbx + rax*2]
test rsi, rsi
je 0x140004a26
movzx ecx, word [rsi]
test cx, cx
je 0x140004a0b
cmp cx, 0x5c
je 0x140004a19
add rsi, 2
movzx ecx, word [rsi]
test cx, cx
jne 0x1400049f6
mov ecx, r15d
cmp cx, 0x5c
mov rax, r15
cmove rax, rsi
mov rsi, rax
test rsi, rsi
je 0x140004a26
sub rsi, rbx
sar rsi, 1
jmp 0x140004a29
mov esi, r12d
lea rdx, [rdi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x140004a45
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rbp + 0x38]
jmp 0x14000497f
movzx esi, ax
lea rdx, [rdi - 0x18]
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x140004a99
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x140004a99
lea rdx, [rdi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x140004a96
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov esi, r15d
mov rbx, qword [rbp + 0x38]
lea rdx, [rbx - 0x18]
mov ecx, r12d
lock xadd dword [rdx + 0x10], ecx
add ecx, r12d
test ecx, ecx
jg 0x140004aba
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov rbx, qword [rsp + 0x50]
mov eax, esi
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140001814
int3
mov ecx, 0x80070057
call fcn.140001814
int3