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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x784
mov eax, dword [0x42a040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x210]
mov esi, ecx
push 0
push eax
call fcn.00412cc0
add esp, 0xc
lea ecx, [ebp - 0x210]
mov edx, 0xa
call fcn.00401a50
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e0b7
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x580]
call fcn.00401dd0
push 0x564
lea eax, [ebp - 0x778]
push 0
push eax
call fcn.00412cc0
add esp, 0xc
lea ecx, [esi + 0x580]
cmp dword [esi + 0x594], 7
jbe 0x40e104
mov ecx, dword [esi + 0x580]
lea edx, [ebp - 0x778]
call fcn.00405dd0
movzx eax, word [ebp - 0x6be]
lea ebx, [esi + 0x598]
shl eax, 0x14
lea edi, [esi + 8]
test eax, eax
mov ecx, 0x6400000
cmove eax, ecx
mov dword [esi + 0x574], eax
lea eax, [esi + 0xc]
mov dword [ebp - 0x77c], eax
nop dword [eax + eax]
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.Iime_stc.map
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e176
mov ecx, ebx
call fcn.00401b50
lea eax, [esi + 0xc]
lea edi, [esi + 8]
mov dword [ebp - 0x77c], eax
push 0
push 2
push 2
push 0
push 0
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x40e21b
push str.Iime_STTrie_Codetable
push dword [esi + 0x574]
push 0
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi], eax
test eax, eax
jne 0x40e1c8
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
jmp 0x40e21b
push 0
push 0
push 0
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x77c]
mov dword [ecx], eax
test eax, eax
jne 0x40e1f6
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
jmp 0x40e1b6
cmp dword [esi + 0x594], 7
lea eax, [esi + 0x580]
jbe 0x40e20b
mov eax, dword [esi + 0x580]
push eax
mov ecx, esi
call fcn.0040e5d0
test eax, eax
jne 0x40e2e2
lea eax, [esi + 0xc]
mov dword [ebp - 0x77c], eax
mov eax, dword [eax]
mov dword [ebp - 0x784], eax
test eax, eax
je 0x40e35e
cmp dword [esi + 8], 0
lea edi, [esi + 8]
je 0x40e345
cmp dword [esi + 4], 0xffffffff
je 0x40e345
mov eax, dword [esi + 0x57c]
mov ecx, dword [esi + 0x574]
mov dword [ebp - 0x780], ecx
cmp eax, dword [esi + 0x578]
jb 0x40e278
imul ecx, ecx, 0x19
mov eax, 0x51eb851f
mul ecx
shr edx, 5
add dword [ebp - 0x780], edx
push dword [ebp - 0x784]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x77c]
mov dword [esi], 0
mov dword [eax], 0
mov eax, dword [edi]
test eax, eax
je 0x40e2a9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40e2d1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e2d1
mov ecx, ebx
call fcn.00401b50
mov eax, dword [ebp - 0x780]
mov dword [esi + 0x574], eax
jmp 0x40e140
mov eax, dword [esi + 0x57c]
mov dword [esi + 0xd0], eax
shr eax, 0x14
inc eax
cmp word [esi + 0xca], ax
je 0x40e32f
mov word [esi + 0xca], ax
lea eax, [esi + 0x580]
cmp dword [eax + 0x14], 7
jbe 0x40e310
mov eax, dword [eax]
sub esp, 0x564
add esi, 0x10
mov ecx, 0x159
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
call fcn.00405e60
add esp, 0x564
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004113fe
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x77c]
mov dword [esi], 0
mov dword [eax], 0
mov eax, dword [esi + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40e375
push eax
call ebx
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40e3a3
push eax
call ebx
lea eax, [esi + 0x598]
mov dword [esi + 4], 0xffffffff
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e3a3
lea ecx, [esi + 0x598]
call fcn.00401b50
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004113fe
mov esp, ebp
pop ebp
ret