Function at 0x466050
Capabilities:
Check if file exists
Create directory
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x4a50b0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d62b0]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov byte [esp + 0x3c], 1
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov dword [esp + 0x1c], eax
call fcn.0040d0b0
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x3c], 2
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call ebp
test eax, eax
je 0x4660ca
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4661a2
push edi
call ebp
test eax, eax
je 0x4660e3
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4660e3
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
call fcn.004687f0
push 0x5c
push edi
call fcn.00488353
add esp, 8
test eax, eax
je 0x4661a2
sub eax, edi
sar eax, 1
test eax, eax
jle 0x4661a2
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
call fcn.0040b8d0
mov byte [esp + 0x3c], 3
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x466174
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x466163
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x466163
call fcn.0040d0b0
mov ebx, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x46615a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [esp + 0x14], ebx
jmp 0x466170
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x18]
call fcn.0040cfc0
mov edi, dword [esp + 0x14]
mov byte [esp + 0x3c], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4660b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4660b4
cmp dword [esp + 0x30], 0
je 0x4662e3
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
lea ebp, [ecx + esi]
cmp esi, ebp
jbe 0x4661c1
call fcn.00489916
lea ebx, [ebp - 1]
cmp ebx, ebp
ja 0x4661cc
cmp ebx, esi
jae 0x4661d1
call fcn.00489916
mov esi, ebx
mov edi, ebx
shr esi, 2
and edi, 3
cmp ebx, ebp
jb 0x4661e4
call fcn.00489916
mov eax, dword [esp + 0x28]
cmp eax, esi
ja 0x4661ee
sub esi, eax
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx + esi*4]
mov esi, dword [edx + edi*4]
mov ecx, dword [esi - 0x10]
lea eax, [edx + edi*4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub esi, 0x10
call edx
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x466222
cmp eax, dword [esi]
jne 0x466222
mov edi, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x46625d
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x46634b
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.004883f0
add esp, 0x10
mov esi, dword [esp + 0x30]
add edi, 0x10
test esi, esi
je 0x4662b2
mov edx, dword [esp + 0x28]
lea eax, [ebp - 1]
mov ecx, eax
shr ecx, 2
cmp edx, ecx
ja 0x46627a
sub ecx, edx
mov ecx, dword [ebx + ecx*4]
and eax, 3
lea eax, [ecx + eax*4]
mov eax, dword [eax]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4662a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
sub esi, 1
mov dword [esp + 0x30], esi
jne 0x4662b2
mov dword [esp + 0x2c], 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4662d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x4661ad
mov edi, dword [esp + 0x14]
lea eax, [edi - 0x10]
mov byte [esp + 0x3c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x466304
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x20]
call fcn.00468870
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x466332
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
jmp fcn.0040d750