Function at 0x40e8a0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x489d98
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b47a8]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
call fcn.0044d630
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e8e1
push 0x80004005
call fcn.00401db0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x50], 0
mov ecx, dword [esp + 0x5c]
push 0
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004146b0
push str.fhistory.dat
push eax
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0x68], 1
call fcn.00406070
add esp, 0x18
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00406820
mov byte [esp + 0x50], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e956
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x50], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e97b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40ea12
lea ecx, [esp + 0x24]
push ecx
call fcn.00416600
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x58], 3
call fcn.00416920
call fcn.0044d630
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e9c6
push 0x80004005
call fcn.00401db0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x50], 4
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x40ea54
add ebx, 0xfffffff0
mov byte [esp + 0x50], 3
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ea04
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x50], 0
call fcn.00416680
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x50], 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 8
mov esi, dword [esp + 0x18]
push 0
push 0x494704
lea ecx, [esp + 0x64]
call fcn.004068a0
test esi, esi
mov eax, esi
je 0x40eb25
mov edi, dword [eax + 8]
test edi, edi
mov ecx, dword [esi]
mov dword [esp + 0x18], ecx
je 0x40eb0d
mov esi, dword [esp + 0x58]
mov edx, dword [esi + 0xf8]
push 0
push 0
push 0x1004
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [edi + 0x10], 2
mov ebp, eax
jne 0x40eab1
push 4
push 0x495558
lea ecx, [esp + 0x64]
call fcn.004068a0
cmp dword [edi + 0x10], 6
jne 0x40eac7
push 8
push 0x495560
lea ecx, [esp + 0x64]
call fcn.004068a0
mov ebx, dword [esp + 0x5c]
cmp dword [ebx - 0xc], 0
jle 0x40eb11
mov eax, dword [edi + 4]
push 0
push 2
push 0
push 0
push eax
add ebp, 1
push ebp
add esi, 0xd8
push 3
mov ecx, esi
call fcn.00453695
push ebx
mov ebp, eax
push 1
push ebp
mov ecx, esi
call fcn.004534a5
mov edi, dword [edi + 0xc]
push edi
push 2
push ebp
mov ecx, esi
call fcn.004534a5
jmp 0x40eb11
mov ebx, dword [esp + 0x5c]
cmp dword [esp + 0x18], 0
jne 0x40ea50
mov edi, dword [esp + 0x14]
jmp 0x40e9e3
call fcn.0044d52a
int3