Function at 0x402940
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4251d3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1fc
push esi
push edi
push 0xf
push 0x42842c
mov dword [esp + 0x214], 0
call fcn.00402370
mov esi, dword [esp + 0x220]
add esp, 8
mov edi, eax
mov eax, 0x426180
test esi, esi
je 0x40298b
mov eax, esi
push eax
lea eax, [esp + 0x108]
push edi
push eax
call fcn.0041bf8c
push edi
call fcn.0041bfde
add esp, 0x10
lea ecx, [esp + 0x104]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x402a1b
lea ecx, [esp + 0x3c]
call fcn.00408f50
push 0
lea edx, [esp + 0x108]
push 0x74
lea eax, [esp + 0x38]
push edx
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0x21c], 1
call fcn.00409080
mov ecx, eax
mov eax, dword [ecx]
test eax, eax
mov edx, dword [ecx + 4]
mov dword [esp + 0x28], edx
mov ecx, dword [ecx + 8]
mov dword [esp + 0x2c], ecx
je 0x402a52
push 0
push str.Error
push str.Failed_to_read_file
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x3c]
mov byte [esp + 0x20c], 0
call fcn.00408f70
test esi, esi
je 0x402c04
mov al, byte [esi - 1]
test al, al
je 0x402bfa
cmp al, 0xff
je 0x402bfa
dec al
pop edi
mov byte [esi - 1], al
pop esi
mov ecx, dword [esp + 0x1fc]
mov dword fs:[0], ecx
add esp, 0x208
ret
push ebx
push ebp
lea edx, [esp + 0x10]
push 7
push edx
lea ecx, [esp + 0x4c]
call fcn.00408b70
mov eax, dword [eax]
push 0x428414
lea ecx, [esp + 0x14]
push str.version
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], eax
call fcn.00408a00
mov ecx, eax
call fcn.004080c0
push str.UTF_8
lea edx, [esp + 0x14]
push str.encoding
push edx
lea ecx, [esp + 0x20]
call fcn.00408a00
mov ecx, eax
call fcn.004080c0
push 0x2b
push 0x4283cc
call fcn.00402370
push 0x2e
push 0x42839c
mov edi, eax
call fcn.00402370
push 0x15
push 0x428384
mov ebp, eax
call fcn.00402370
add esp, 0x18
mov ebx, eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x44]
push 0
push edi
push eax
call fcn.00413e10
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x18]
mov edx, dword [eax + 4]
mov dword [esp + 0x1c], edx
call fcn.0040b7b0
test eax, eax
je 0x402b33
lea eax, [esp + 0x28]
push str.value
lea ecx, [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.0040b720
mov ecx, eax
call fcn.004085f0
mov edx, dword [eax]
push 0x428378
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edx
call fcn.00408310
push 0
lea eax, [esp + 0x30]
push ebp
push eax
lea ecx, [esp + 0x50]
call fcn.00413e10
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x20]
mov edx, dword [eax + 4]
mov dword [esp + 0x24], edx
call fcn.0040b7b0
test eax, eax
je 0x402b8d
lea eax, [esp + 0x2c]
push str.value
lea ecx, [esp + 0x2c]
push eax
push ecx
lea ecx, [esp + 0x2c]
call fcn.0040b720
mov ecx, eax
call fcn.004085f0
mov edx, dword [eax]
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edx
call fcn.00408310
push 0
push 0x21
lea eax, [esp + 0x114]
push 0x428374
push eax
lea ecx, [esp + 0x54]
call fcn.004093f0
push edi
call fcn.0041bfde
push ebp
call fcn.0041bfde
push ebx
call fcn.0041bfde
add esp, 0xc
lea ecx, [esp + 0x44]
mov byte [esp + 0x214], 0
call fcn.00408f70
pop ebp
pop ebx
test esi, esi
je 0x402c04
mov al, byte [esi - 1]
test al, al
je 0x402bfa
cmp al, 0xff
je 0x402bfa
dec al
pop edi
mov byte [esi - 1], al
pop esi
mov ecx, dword [esp + 0x1fc]
mov dword fs:[0], ecx
add esp, 0x208
ret
dec esi
push esi
call fcn.0041b142
add esp, 4
mov ecx, dword [esp + 0x204]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x208
ret