Function at 0x4021b0
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x148
mov eax, dword [0x40e398]
xor eax, esp
mov dword [esp + 0x144], eax
push ebp
mov ebp, dword [esp + 0x154]
push esi
push edi
push 0x104
lea eax, [esp + 0x50]
push 0
push eax
call fcn.00404c00
mov eax, dword [esp + 0x164]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
sub eax, 1
je 0x402270
sub eax, 1
je 0x40225e
sub eax, 1
jne 0x4022c0
lea ecx, [esp + 0x4c]
push ecx
push eax
push eax
push 0x23
push eax
call fcn.00403100
add esp, 0x14
lea edx, [esp + 0x4c]
push edx
call edi
cmp byte [esp + eax + 0x4b], 0x5c
je 0x40222c
mov byte [esp + eax + 0x4c], 0x5c
mov byte [esp + eax + 0x4d], 0
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4022c0
mov byte [ebp], 0
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x144]
xor ecx, esp
call fcn.00404bd3
add esp, 0x148
ret
lea ecx, [esp + 0x4c]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x402214
push 0x104
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [esp + 0x4c]
push edx
call edi
cmp byte [esp + eax + 0x4b], 0x5c
je 0x402294
mov byte [esp + eax + 0x4c], 0x5c
inc eax
lea esi, [esp + eax + 0x4c]
push str.Temp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402240
push 0x40b28c
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.2408231139544122406276713532
call edi
dec eax
cmp eax, 8
jl 0x402244
mov al, byte [eax + str.2408231139544122406276713532]
cmp al, 0x30
jl 0x402244
cmp al, 0x39
jg 0x402244
movsx esi, al
sub esi, 0x30
and esi, reloc.WS2_32.dll_closesocket
jns 0x4022fa
dec esi
or esi, 0xfffffffc
inc esi
push str.2408231139544122406276713532
add esi, 4
call edi
sub eax, esi
dec eax
xor ecx, ecx
lea eax, [eax + str.2408231139544122406276713532]
nop
mov dl, byte [eax]
test dl, dl
je 0x402375
test esi, esi
jle 0x402375
add dl, dl
inc dl
inc eax
mov byte [esp + ecx + 0xc], dl
mov dl, byte [eax]
dec esi
test dl, dl
je 0x40236a
test esi, esi
jle 0x40236a
add dl, dl
inc dl
inc eax
mov byte [esp + ecx + 0xd], dl
mov dl, byte [eax]
dec esi
test dl, dl
je 0x40236d
test esi, esi
jle 0x40236d
add dl, dl
inc dl
inc eax
mov byte [esp + ecx + 0xe], dl
mov dl, byte [eax]
dec esi
test dl, dl
je 0x402372
test esi, esi
jle 0x402372
add dl, dl
inc dl
mov byte [esp + ecx + 0xf], dl
add ecx, 4
dec esi
inc eax
cmp ecx, 0x40
jb 0x402310
jmp 0x402375
inc ecx
jmp 0x402375
add ecx, 2
jmp 0x402375
add ecx, 3
mov byte [esp + ecx + 0xc], 0x2e
push 0x40b288
lea ecx, [esp + ecx + 0x11]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x4c]
push edx
call edi
mov ecx, 0x104
sub ecx, eax
push ecx
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x54]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [esp + eax + 0x54]
push ecx
call esi
push 0x103
lea edx, [esp + 0x50]
push edx
push ebp
call esi
mov ecx, dword [esp + 0x150]
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 1
call fcn.00404bd3
add esp, 0x148
ret