Function at 0x4507c0
Capabilities:
Access peb ldr_data
Check if file exists
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x46e5c0
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48b670]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2c]
push 1
push ecx
add eax, 0xfffffff0
xor ebx, ebx
mov dword [esp + 0x20], esp
mov esi, esp
push eax
mov dword [esp + 0x30], ebx
call fcn.00403750
add eax, 0x10
mov dword [esi], eax
lea eax, [esp + 0x20]
add esp, 4
push eax
call fcn.00450500
add esp, 0xc
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 1
call fcn.004037c0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x24], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45084b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
mov eax, dword [esp + 0x2c]
je 0x450899
add eax, 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x450882
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [eax - 0xc]
cmp ecx, ebx
jg 0x4508a5
or esi, 0xffffffff
jmp 0x4508c1
push 0x5c
push eax
call fcn.00430117
add esp, 8
cmp eax, ebx
jne 0x4508b9
or esi, 0xffffffff
jmp 0x4508c1
sub eax, dword [esp + 0x2c]
sar eax, 1
mov esi, eax
call fcn.004194d8
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4508db
push 0x80004005
call fcn.00401f50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov byte [esp + 0x24], 2
cmp esi, 0xffffffff
je 0x450a01
nop
push esi
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x34]
call fcn.0040c4a0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 3
call fcn.004037c0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x24], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x450943
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45095a
push ebx
push edi
call ebp
cmp eax, ebx
je 0x45099b
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx - 0xc]
lea eax, [esi + 1]
cmp eax, ebx
jl 0x450a05
cmp eax, edx
jge 0x450a05
lea ecx, [ecx + eax*2]
push 0x5c
push ecx
call fcn.00430117
add esp, 8
cmp eax, ebx
je 0x450a01
mov ecx, dword [esp + 0x2c]
sub eax, ecx
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
jne 0x450900
jmp 0x450a05
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [edi - 0x10]
mov byte [esp + 0x24], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4509c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4509eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x450a4c
mov ecx, dword [esp + 0x2c]
push ebx
push ecx
call ebp
cmp eax, ebx
jne 0x450a4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00401dc0
lea ecx, [esp + 0x2c]
call fcn.00401dc0
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
lea eax, [edi - 0x10]
mov byte [esp + 0x24], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x450a6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450a94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret