Function at 0x404130
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a94f6
push eax
mov eax, 0x220c
mov dword fs:[0], esp
call fcn.004a2ae0
mov eax, dword [0x4c2080]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov ecx, dword [0x4d1ac8]
lea edx, [esp + 0xc]
push 0x100
push edx
mov eax, dword [ecx + 8]
push 0x12c
push eax
mov dword [esp + 0x2224], 0
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jne 0x40418f
mov word [esp + 0xc], ax
mov ecx, 0x100
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
sub ecx, eax
cmp ecx, 1
push esi
jle 0x4041c7
lea edx, [esp + 0x14]
test edx, edx
jne 0x4041af
xor eax, eax
jmp 0x4041b6
lea eax, [esp + 0x14]
push eax
call ebx
lea ecx, [esp + 0x14]
push ecx
push eax
lea ecx, [esp + 0x14]
call fcn.00405750
jmp 0x404215
push 0x1ff
lea ecx, [esp + 0x10]
mov esi, 0x200
call fcn.00405530
test eax, eax
je 0x40420a
push esi
push eax
push 0x12c
call fcn.00405b00
mov edx, esi
sub edx, eax
cmp edx, 1
jg 0x40420a
add esi, 0x100
lea ecx, [esp + 0xc]
lea eax, [esi - 1]
push eax
call fcn.00405530
test eax, eax
jne 0x4041de
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.004055f0
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
cmp eax, 0x404
je 0x404235
cmp eax, 0x409
jne 0x4043b7
mov edx, dword [0x4c2080]
push edi
mov dword [esp + 0xc], edx
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x121a]
mov word [esp + 0x1218], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x1218]
mov byte [esp + 0x2220], 1
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x218]
lea edx, [esp + 0x1218]
push ecx
push 0
push 0x4c214c
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [esp + 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x800
lea ecx, [esp + 0x21c]
push str..Lang
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncat]
lea edx, [esp + 0x224]
add esp, 0xc
test edx, edx
jne 0x4042cc
xor ebx, ebx
jmp 0x4042d8
lea eax, [esp + 0x218]
push eax
call ebx
mov ebx, eax
push ebx
lea ecx, [esp + 0x10]
call fcn.004059f0
test eax, eax
je 0x40431d
lea eax, [ebx + ebx]
lea ecx, [ebx + ebx + 2]
cmp ecx, eax
jb 0x40430c
mov edi, dword [esp + 0xc]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x218]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc]
mov dword [ecx - 8], ebx
mov edx, dword [esp + 0xc]
mov word [eax + edx], 0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
call fcn.00404410
test eax, eax
pop edi
je 0x404388
mov esi, dword [esp + 8]
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00405e80
add esp, 8
test eax, eax
jne 0x404378
test esi, esi
je 0x404388
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404378
push esi
call fcn.00405fc0
add esp, 4
test eax, eax
jne 0x404378
push 1
call fcn.00442630
push eax
push esi
call fcn.00442880
add esp, 0xc
jmp 0x404388
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x404388
mov dword [0x4d1b58], eax
mov eax, dword [esp + 8]
mov edx, dword [0x4c2084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4043b7
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4043b7
mov edx, dword [esp + 8]
add edx, 0xfffffff4
push edx
call fcn.00442ac0
add esp, 4
mov eax, dword [esp + 0xc]
mov edx, dword [0x4c2084]
pop esi
pop ebx
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4043e8
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4043e8
mov edx, dword [esp + 4]
add edx, 0xfffffff4
push edx
call fcn.00442ac0
add esp, 4
mov ecx, dword [esp + 0x220c]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x2218
ret