Function at 0x4168b0
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4542eb
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x46a180]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x230], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x220]
push eax
call fcn.004164b0
mov dword [ebp - 4], 1
call fcn.004139e0
mov ecx, eax
test ecx, ecx
je 0x416b62
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x22c], esi
mov eax, dword [ebp - 0x220]
or ebx, 0xffffffff
mov byte [ebp - 4], 2
cmp dword [eax - 0xc], 0
jne 0x41693b
lea edi, [ebx + 7]
jmp 0x416b06
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
or ecx, eax
jge 0x416965
push 0x105
lea ecx, [ebp - 0x22c]
call fcn.00413ae0
mov esi, dword [ebp - 0x22c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [esi - 8]
push esi
test eax, eax
jne 0x4169a5
call fcn.00439bd5
add esp, 8
test eax, eax
js 0x416b58
cmp eax, dword [esi - 8]
jg 0x416b58
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea edi, [ecx + 5]
jmp 0x416b06
call fcn.00439bd5
add esp, 8
test eax, eax
js 0x416b58
cmp eax, dword [esi - 8]
jg 0x416b58
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x416a38
push 0x20a
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00432ee0
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x21c]
add esp, 0xc
push dword [ebp - 0x220]
push eax
call edi
push 0x458b08
lea eax, [ebp - 0x21c]
push eax
call edi
push 0
push dword [ebp - 0x220]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x416a38
lea edi, [eax + 6]
jmp 0x416b06
mov edx, dword [ebp - 0x230]
lea ecx, [esi - 0x10]
mov edi, dword [edx]
sub edi, 0x10
cmp ecx, edi
je 0x416a99
cmp dword [edi + 0xc], 0
jl 0x416a8e
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x416a8e
push ecx
call fcn.004161c0
add esp, 4
mov dword [ebp - 0x228], eax
mov ecx, ebx
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x416a81
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x230]
add eax, 0x10
mov dword [ecx], eax
jmp 0x416a99
push dword [esi - 0xc]
mov ecx, edx
push esi
call fcn.00413b80
mov edi, dword [ebp - 0x224]
mov eax, dword [ebp - 0x220]
mov edi, dword [edi]
lea edx, [eax - 0x10]
sub edi, 0x10
cmp edx, edi
je 0x416b04
cmp dword [edi + 0xc], 0
jl 0x416af5
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x416af5
push edx
call fcn.004161c0
add esp, 4
mov dword [ebp - 0x228], eax
mov ecx, ebx
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x416ae8
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x224]
add eax, 0x10
mov dword [ecx], eax
jmp 0x416b04
push dword [eax - 0xc]
mov ecx, dword [ebp - 0x224]
push eax
call fcn.00413b80
xor edi, edi
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x416b1d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x416b38
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004312d2
mov esp, ebp
pop ebp
ret 8
push 0x80070057
call fcn.00406380
push 0x80004005
call fcn.00406380
int3