Function at 0x140004880
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x20
mov rdi, rcx
call fcn.14000144c
xor r15d, r15d
mov rcx, rax
test rax, rax
je 0x140004b4c
mov rax, qword [rax]
call qword [rax + 0x18]
lea r13d, [r15 + 1]
mov edx, 0x104
mov ecx, r13d
lea rbx, [rax + 0x18]
mov eax, dword [rbx - 0xc]
sub ecx, dword [rbx - 8]
sub eax, edx
or ecx, eax
mov qword [rbp + 0x48], rbx
jge 0x1400048e6
lea rcx, [rbp + 0x48]
call fcn.140001a54
mov rbx, qword [rbp + 0x48]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
sete dil
test rbx, rbx
jne 0x140004902
mov eax, r15d
jmp 0x140004916
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.14002d1c8
test eax, eax
js 0x140004b57
cmp eax, dword [rbx - 0xc]
jg 0x140004b57
mov dword [rbx - 0x10], eax
or r12d, 0xffffffff
cdqe
mov word [rbx + rax*2], r15w
test dil, dil
je 0x14000493c
mov esi, 0x80004005
jmp 0x140004b18
movsxd rdi, dword [rbx - 0x10]
mov sil, r15b
mov eax, r15d
mov edx, 0x5c
test edi, edi
jle 0x1400049af
movsxd r14, eax
cmp word [rbx + r14*2], 0x2f
jne 0x14000498a
test sil, sil
jne 0x140004985
mov eax, dword [rbx - 0xc]
mov ecx, r13d
sub ecx, dword [rbx - 8]
sub eax, edi
or ecx, eax
mov sil, r13b
jge 0x140004985
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140001a54
mov rbx, qword [rbp + 0x48]
mov edx, 0x5c
mov word [rbx + r14*2], dx
lea rax, [r14*2 + 2]
sar rax, 1
cmp eax, edi
jl 0x14000494f
test sil, sil
je 0x1400049af
cmp edi, dword [rbx - 0xc]
jg 0x140004b57
mov dword [rbx - 0x10], edi
mov word [rbx + rdi*2], r15w
lea r14, [rbx - 0x10]
cmp dword [r14], r15d
jle 0x1400049e9
movzx ecx, word [rbx]
mov rsi, rbx
test cx, cx
je 0x1400049d7
cmp cx, dx
je 0x1400049e4
add rsi, 2
movzx ecx, word [rsi]
test cx, cx
jne 0x1400049c3
mov ecx, r15d
cmp cx, dx
mov rax, r15
cmove rax, rsi
mov rsi, rax
test rsi, rsi
jne 0x1400049ee
mov esi, r12d
jmp 0x1400049f4
sub rsi, rbx
sar rsi, 1
mov r13d, 0x5c
cmp esi, r12d
jne 0x140004a04
mov r8d, dword [r14]
jmp 0x140004a07
mov r8d, esi
lea rdx, [rbp + 0x50]
lea rcx, [rbp + 0x48]
call fcn.1400054a8
mov rdi, qword [rbp + 0x50]
mov rcx, rdi
call fcn.1400065a4
test al, al
jne 0x140004a49
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140004a49
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x140004a49
cmp eax, 0xb7
jne 0x140004ac9
cmp esi, r12d
je 0x140004af5
lea eax, [rsi + 1]
test eax, eax
js 0x140004aa1
cmp eax, dword [r14]
jge 0x140004aa1
cdqe
lea rsi, [rbx + rax*2]
test rsi, rsi
je 0x140004aa1
movzx ecx, word [rsi]
test cx, cx
je 0x140004a86
cmp cx, r13w
je 0x140004a94
add rsi, 2
movzx ecx, word [rsi]
test cx, cx
jne 0x140004a71
mov ecx, r15d
cmp cx, r13w
mov rax, r15
cmove rax, rsi
mov rsi, rax
test rsi, rsi
je 0x140004aa1
sub rsi, rbx
sar rsi, 1
jmp 0x140004aa4
mov esi, r12d
lea rdx, [rdi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x140004ac0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rbp + 0x48]
jmp 0x1400049fa
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 0x140004b14
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x140004b14
lea rdx, [rdi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x140004b11
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov esi, r15d
mov rbx, qword [rbp + 0x48]
lea rdx, [rbx - 0x18]
mov ecx, r12d
lock xadd dword [rdx + 0x10], ecx
add ecx, r12d
test ecx, ecx
jg 0x140004b35
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov rbx, qword [rsp + 0x60]
mov eax, esi
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400017a4
int3
mov ecx, 0x80070057
call fcn.1400017a4
int3