Function at 0x40de81
Capabilities:
Check if file exists
Get common file path
Read file on windows

Disassembly:
push ebp
sub esp, 0x30c
lea ebp, [esp - 4]
mov eax, dword [0x4541c0]
xor eax, ebp
mov dword [ebp + 0x30c], eax
push 0x2c
mov eax, 0x4418fe
call fcn.0042baa9
xor ebx, ebx
mov dword [ebp - 0x20], ebx
call dword [0x4c6484]
mov edi, 0x103
push edi
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x209]
push ebx
push eax
mov byte [ebp + 0x208], bl
call fcn.0042bc20
lea esi, [edi + 1]
push esi
lea eax, [ebp + 0x208]
push ebx
push eax
call fcn.0042bc20
add esp, 0x18
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x14]
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
je 0x40df14
cmp dword [ebp - 0x20], ebx
je 0x40df14
lea eax, [ebp + 0x208]
push eax
push ebx
push dword [ebp - 0x20]
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push dword [ebp - 0x20]
call dword [0x4c648c]
jmp 0x40df26
lea eax, [ebp + 0x208]
push eax
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea eax, [ebp - 0x14]
push 0x4456b8
push eax
call fcn.00408331
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp - 4], ebx
call fcn.00402dff
push eax
lea eax, [ebp + 0x208]
push eax
call fcn.00416cb3
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004012b7
push edi
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.0042bc20
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp]
push esi
push eax
mov dword [ebp - 0x10], ebx
call fcn.0042daa1
lea eax, [ebp - 0x14]
push 0x44569c
push eax
call fcn.00408331
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
add esp, 0x20
push dword [eax]
lea eax, [ebp]
push eax
call edi
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004012b7
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp]
push eax
call fcn.0040a529
cmp eax, ebx
pop ecx
pop ecx
jge 0x40dfcb
push dword [ebp - 0x10]
call fcn.0042d8fa
pop ecx
jmp 0x40e290
mov esi, 0x44568c
lea eax, [ebp - 0x30]
push esi
push eax
call fcn.00408331
push dword [eax]
push dword [ebp - 0x10]
call fcn.0042cf00
mov ecx, dword [ebp - 0x30]
add esp, 0x10
add ecx, 0xfffffff0
mov dword [ebp - 0x18], eax
call fcn.004012b7
cmp dword [ebp - 0x18], ebx
je 0x40dfbd
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.00408331
push dword [eax]
call fcn.0042b470
mov ecx, dword [ebp - 0x28]
add dword [ebp - 0x18], eax
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004012b7
mov esi, 0x445678
lea eax, [ebp - 0x2c]
push esi
push eax
call fcn.00408331
push dword [eax]
push dword [ebp - 0x18]
call fcn.0042cf00
mov ecx, dword [ebp - 0x2c]
add esp, 0x10
add ecx, 0xfffffff0
mov dword [ebp - 0x14], eax
call fcn.004012b7
cmp dword [ebp - 0x14], ebx
je 0x40dfbd
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.00408331
push dword [eax]
call fcn.0042b470
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
add esp, 0xc
add ecx, 0xfffffff0
add esi, eax
call fcn.004012b7
mov byte [esi], bl
lea eax, [ebp - 0x24]
push eax
mov esi, 0x445674
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x24], ebx
jmp 0x40e097
push eax
lea eax, [ebp + 0x208]
push eax
call edi
lea eax, [ebp - 0x24]
push eax
push esi
push ebx
call fcn.0042e941
add esp, 0xc
cmp eax, ebx
jne 0x40e087
push dword [ebp - 0x10]
call fcn.0042d8fa
mov dword [esp], 0x103
lea eax, [ebp + 0x105]
push ebx
push eax
mov byte [ebp + 0x104], bl
call fcn.0042bc20
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp + 0x104]
push 0x104
push eax
call fcn.0042daa1
lea eax, [ebp - 0x1c]
push 0x445660
push eax
call fcn.00408331
add esp, 0x20
push dword [eax]
lea eax, [ebp + 0x104]
push eax
call edi
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004012b7
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40e290
push ebx
push ebx
push 3
push ebx
push ebx
push bind
lea eax, [ebp + 0x104]
push eax
call dword [0x4c6488]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e290
push 2
push ebx
push ebx
push esi
mov dword [ebp - 0x38], ebx
call dword [0x4c649c]
push ebx
push ebx
push ebx
push esi
mov edi, eax
call dword [0x4c649c]
lea eax, [edi + 1]
push eax
call fcn.0041c91c
mov dword [ebp - 0x18], eax
lea eax, [edi + 1]
push eax
push ebx
push dword [ebp - 0x18]
call fcn.0042bc20
add esp, 0x10
push ebx
lea eax, [ebp - 0x38]
push eax
push edi
push dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor edi, edi
inc edi
push esi
cmp eax, edi
je 0x40e195
call dword [0x4c648c]
jmp 0x40e290
call dword [0x4c648c]
call fcn.0041cc47
push eax
lea ecx, [ebp - 0x10]
call fcn.00401633
push dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
push ebx
mov dword [ebp - 4], edi
call fcn.0040dace
lea eax, [ebp - 0x1c]
push 0x445638
push eax
call fcn.00408331
mov eax, dword [eax]
pop ecx
pop ecx
push ebx
push eax
lea ecx, [ebp - 0x10]
call fcn.0040301b
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
mov esi, eax
call fcn.004012b7
cmp esi, 0xffffffff
je 0x40e27c
push esi
push 0x445634
lea ecx, [ebp - 0x10]
call fcn.0040301b
mov esi, eax
cmp esi, 0xffffffff
je 0x40e27c
push esi
push ebx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
call fcn.00403479
push 0xa
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.0040af85
cmp eax, edi
jle 0x40e271
dec eax
sub esi, eax
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.0040b24b
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp + 0x104]
push eax
call dword [0x4c6488]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e271
mov eax, dword [ebp - 0x10]
push ebx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
mov eax, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00402dff
push eax
push esi
call dword [0x4c6538]
push esi
call dword [0x4c648c]
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004012b7
push dword [ebp - 0x18]
call fcn.0041c911
pop ecx
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004012b7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x30c]
xor ecx, ebp
call fcn.0042ba9a
add ebp, 0x310
leave
ret