Function at 0x40eb70
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, 8
call fcn.00401a50
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ebb7
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x6c4]
call fcn.00401dd0
push 0x564
lea eax, [ebp - 0x778]
push 0
push eax
call fcn.00412cc0
add esp, 0xc
lea ecx, [esi + 0x6c4]
cmp dword [esi + 0x6d8], 7
jbe 0x40ec04
mov ecx, dword [esi + 0x6c4]
lea edx, [ebp - 0x778]
call fcn.00405dd0
movzx eax, word [ebp - 0x6be]
lea ebx, [esi + 0x6dc]
shl eax, 0x14
lea edi, [esi + 8]
test eax, eax
mov ecx, 0x2800000
cmove eax, ecx
mov dword [esi + 0x8e4], 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_enc.map
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ec76
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 0x40ed1b
push str.Iime_EnTrie_Codetable
push dword [esi + 0x8e4]
push 0
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi], eax
test eax, eax
jne 0x40ecc8
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
jmp 0x40ed1b
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 0x40ecf6
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
jmp 0x40ecb6
cmp dword [esi + 0x6d8], 7
lea eax, [esi + 0x6c4]
jbe 0x40ed0b
mov eax, dword [esi + 0x6c4]
push eax
mov ecx, esi
call fcn.0040f2b0
test eax, eax
jne 0x40ede2
lea eax, [esi + 0xc]
mov dword [ebp - 0x77c], eax
mov eax, dword [eax]
mov dword [ebp - 0x784], eax
test eax, eax
je 0x40ee5e
cmp dword [esi + 8], 0
lea edi, [esi + 8]
je 0x40ee45
cmp dword [esi + 4], 0xffffffff
je 0x40ee45
mov eax, dword [esi + 0x8ec]
mov ecx, dword [esi + 0x8e4]
mov dword [ebp - 0x780], ecx
cmp eax, dword [esi + 0x8e8]
jb 0x40ed78
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 0x40eda9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40edd1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov dword [esi + 4], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40edd1
mov ecx, ebx
call fcn.00401b50
mov eax, dword [ebp - 0x780]
mov dword [esi + 0x8e4], eax
jmp 0x40ec40
mov eax, dword [esi + 0x8ec]
mov dword [esi + 0xd0], eax
shr eax, 0x14
inc eax
cmp word [esi + 0xca], ax
je 0x40ee2f
mov word [esi + 0xca], ax
lea eax, [esi + 0x6c4]
cmp dword [eax + 0x14], 7
jbe 0x40ee10
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 0x40ee75
push eax
call ebx
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40eea3
push eax
call ebx
lea eax, [esi + 0x6dc]
mov dword [esi + 4], 0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40eea3
lea ecx, [esi + 0x6dc]
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