Function at 0x4022b0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f0ae
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x100
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebx + 8]
xor edi, edi
mov dword [ebp - 0xc4], eax
lea eax, [ecx + 0x18]
push str.Local_State
mov edx, eax
mov dword [ebp - 0x20], edi
lea ecx, [ebp - 0x70]
mov byte [ebp - 0x85], 0
mov dword [ebp - 0xa8], eax
call fcn.004170b0
add esp, 4
mov dword [ebp - 4], edi
lea eax, [ebp - 0x70]
cmp dword [ebp - 0x5c], 7
cmova eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4029c9
test al, 0x10
jne 0x4029c9
cmp dword [ebp - 0x5c], 7
lea eax, [ebp - 0x70]
push edi
cmova eax, dword [ebp - 0x70]
push 0x80
push 3
push edi
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40298c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x402985
push dword [ebp - 0x28]
call fcn.00422766
add esp, 4
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x402985
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], edi
push ecx
push dword [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402976
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x28]
push esi
mov dword [ebp - 0x8c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.00403250
sub esp, 0x28
lea esi, [ebp - 0x40]
mov eax, esp
mov dword [ebp - 0x20], esp
mov dword [eax + 0x24], edi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x58]
push dword [ebp - 0x8c]
xorps xmm0, xmm0
mov dword [ebp - 0x48], edi
push dword [ebp - 0x84]
movups xmmword [ebp - 0x58], xmm0
mov dword [ebp - 0x44], edi
call fcn.004041b0
mov byte [ebp - 4], 5
push edi
push 1
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 6
mov ecx, esi
call fcn.00403c70
mov cl, byte [ebp - 0x30]
add esp, 0x30
mov al, byte [ebp - 0x40]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov byte [ebp - 0x40], cl
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 0x30], al
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], esi
call fcn.00402d80
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x44]
cmp ecx, 0xf
jbe 0x402497
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40248d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a02
push ecx
push edx
call fcn.00417ffd
add esp, 8
mov dword [ebp - 4], 2
push dword [ebp - 0x84]
call fcn.004224c5
sub esp, 0x14
mov byte [ebp - 4], 8
mov ecx, esp
xorps xmm0, xmm0
push 7
movups xmmword [ecx], xmm0
push str.profile
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.004041b0
lea ecx, [ebp - 0x30]
call fcn.004050d0
sub esp, 0x18
xorps xmm0, xmm0
mov ecx, esp
mov esi, eax
push 0xe
movups xmmword [ecx], xmm0
push str.profiles_order
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.004041b0
mov ecx, esi
call fcn.004050d0
mov esi, eax
xorps xmm0, xmm0
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
movups xmmword [ebp - 0x40], xmm0
call fcn.00402cc0
lea eax, [ebp - 0x80]
mov ecx, esi
push eax
movups xmmword [ebp - 0x80], xmm0
call fcn.00402c10
nop dword [eax + eax]
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x40]
call fcn.00403d90
test al, al
je 0x402895
lea ecx, [ebp - 0x40]
call fcn.00402b00
mov ecx, eax
mov byte [ebp - 4], 9
xor edx, edx
xorps xmm0, xmm0
mov dword [ebp - 0xb0], edx
or edi, 4
mov esi, 0xf
cmp byte [ecx], 3
movups xmmword [ebp - 0xc0], xmm0
mov dword [ebp - 0xac], esi
mov byte [ebp - 0xc0], dl
mov dword [ebp - 0x20], edi
jne 0x402a07
mov eax, dword [ecx + 8]
lea ecx, [ebp - 0xc0]
cmp ecx, eax
je 0x4025b5
mov ecx, eax
cmp dword [eax + 0x14], esi
jbe 0x40259a
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0xc0]
call fcn.004100d0
mov esi, dword [ebp - 0xac]
mov edx, dword [ebp - 0xb0]
and edi, 0xfffffffb
mov dword [ebp - 4], 8
or edi, 3
mov byte [ebp - 4], 0xb
test edx, edx
jne 0x4025f3
xorps xmm0, xmm0
mov dword [ebp - 0xcc], edx
mov eax, 7
xor ecx, ecx
movups xmmword [ebp - 0xdc], xmm0
mov dword [ebp - 0xc8], eax
mov word [ebp - 0xdc], cx
jmp 0x40268a
push 0
push 0
cmp esi, 0xf
lea eax, [ebp - 0xc0]
push edx
cmova eax, dword [ebp - 0xc0]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
mov dword [ebp - 0x48], 0
push esi
xorps xmm0, xmm0
mov dword [ebp - 0x44], 0
push ecx
lea ecx, [ebp - 0x58]
movups xmmword [ebp - 0x58], xmm0
call fcn.00417720
cmp dword [ebp - 0x44], 7
lea ecx, [ebp - 0x58]
push esi
cmova ecx, dword [ebp - 0x58]
lea eax, [ebp - 0xc0]
cmp dword [ebp - 0xac], 0xf
push ecx
push dword [ebp - 0xb0]
cmova eax, dword [ebp - 0xc0]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movups xmm0, xmmword [ebp - 0x58]
movups xmmword [ebp - 0xdc], xmm0
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0xcc], xmm0
mov eax, dword [ebp - 0xc8]
or edi, 0x10
mov dword [ebp - 0x20], edi
cmp eax, 7
lea esi, [ebp - 0xdc]
cmova esi, dword [ebp - 0xdc]
push dword [ebp - 0xa8]
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 0xd
call fcn.00402e30
mov eax, dword [ebp - 0xa8]
or edi, 8
mov dword [ebp - 0x20], edi
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x4026cb
mov ecx, dword [eax]
mov eax, dword [eax + 0x10]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x402723
mov ecx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
cmp ecx, edx
jae 0x402708
lea eax, [ecx + 1]
cmp edx, 7
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0xa4]
cmova eax, dword [ebp - 0xa4]
mov dword [eax + ecx*2], 0x5c
jmp 0x402723
push 0x5c
mov byte [ebp - 0x8c], 0
push dword [ebp - 0x8c]
push ecx
lea ecx, [ebp - 0xa4]
call fcn.004178b0
push esi
lea ecx, [ebp - 0xa4]
call fcn.00416420
mov edx, dword [ebp - 0xc4]
mov eax, dword [edx + 4]
cmp eax, dword [edx + 8]
je 0x40278c
xorps xmm0, xmm0
mov ecx, 7
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
movups xmm0, xmmword [ebp - 0xa4]
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x94]
movq qword [eax + 0x10], xmm0
xor eax, eax
add dword [edx + 4], 0x18
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x90], ecx
mov word [ebp - 0xa4], ax
jmp 0x4027a1
lea ecx, [ebp - 0xa4]
push ecx
push eax
mov ecx, edx
call fcn.00407fd0
mov ecx, dword [ebp - 0x90]
and edi, 0xfffffff7
mov byte [ebp - 4], 0xc
cmp ecx, 7
jbe 0x4027e2
mov edx, dword [ebp - 0xa4]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4027d8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a4f
push ecx
push edx
call fcn.00417ffd
add esp, 8
xor eax, eax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0xc8]
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x90], 7
mov word [ebp - 0xa4], ax
cmp ecx, 7
jbe 0x402843
mov edx, dword [ebp - 0xdc]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402839
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a4f
push ecx
push edx
call fcn.00417ffd
add esp, 8
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0xac]
cmp ecx, 0xf
jbe 0x402881
mov edx, dword [ebp - 0xc0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402877
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a4f
push ecx
push edx
call fcn.00417ffd
add esp, 8
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x85], 1
call fcn.00402a60
jmp 0x402530
lea ecx, [ebp - 0x30]
call fcn.00402d80
jmp 0x40298c
push ecx
push edx
call fcn.00417ffd
add esp, 8
mov al, byte [ebp - 0x85]
jmp 0x402956
push ecx
push edx
call fcn.00417ffd
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00417fbf
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
lea eax, [ebp - 0x84]
push eax
call fcn.004224c5
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x5c]
cmp ecx, 7
jbe 0x4028f0
mov edx, dword [ebp - 0x70]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4028e6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a54
jmp 0x4028e6
mov ecx, dword [ebp - 0x5c]
cmp ecx, 7
jbe 0x402954
mov edx, dword [ebp - 0x70]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40294a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40294a
call fcn.00422715
call fcn.00422715
call fcn.00405f00
mov dword [ebp - 0x8c], eax
lea ecx, [ebp - 0x110]
lea eax, [ebp - 0x8c]
push eax
call fcn.00410200
add esp, 4
push ecx
push eax
lea ecx, [ebp - 0xf8]
mov dword [ebp - 4], 0xa
call fcn.004102b0
add esp, 8
lea eax, [ebp - 0xf8]
push 0x43b5f4
push eax
call fcn.0041941e
call fcn.00422715
call fcn.00422715
int3