Function at 0x4057e9
Capabilities:
Check if file exists
Copy file
Get common file path
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44f0e6
mov eax, dword fs:[0]
push eax
sub esp, 0x2d0
mov eax, dword [0x470600]
xor eax, esp
mov dword [esp + 0x2c8], eax
push ebx
push esi
push edi
mov eax, dword [0x470600]
xor eax, esp
push eax
lea eax, [esp + 0x2e0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x103
mov dword [esp + 0x28], eax
xor edi, edi
lea eax, [esp + 0x1d1]
push edi
push eax
mov ebx, ecx
mov byte [esp + 0x1d8], 0
call fcn.00439ec0
add esp, 0xc
lea eax, [ebx + 0xac]
push dword [eax]
mov dword [esp + 0x2c], eax
mov esi, 0x104
lea eax, [esp + 0x1d0]
push esi
push eax
call fcn.004380d4
add esp, 0xc
push str.tlload
lea eax, [esp + 0x1d0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [esp + 0x1cc]
push eax
lea ecx, [esp + 0x1c]
call fcn.00409a22
push esi
lea eax, [esp + 0x1d0]
push edi
push eax
mov dword [esp + 0x2f4], edi
call fcn.00439ec0
add esp, 0xc
push esi
lea eax, [esp + 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x1cc]
push eax
lea ecx, [esp + 0x20]
call fcn.00409a22
push 0x46146c
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x2f4], 1
call fcn.004071bb
add esp, 0xc
push str.tlload.ime
lea ecx, [esp + 0x14]
mov byte [esp + 0x2ec], 2
call fcn.004081df
lea eax, [ebx + 0xec]
cmp dword [eax], edi
jne 0x40591b
push edi
push eax
push edi
push 0x59
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
cmp dword [ebx + 0xf0], edi
jne 0x405aa0
xor eax, eax
push dword [esp + 0x10]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea edi, [esp + 0x1c0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [esp + 0x1b0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call esi
test eax, eax
je 0x405a42
push dword [esp + 0x18]
call esi
test eax, eax
je 0x405a42
lea eax, [esp + 0x1ac]
push eax
push ecx
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], esp
mov ecx, esp
push eax
call fcn.00409f8c
call fcn.00404d9f
test eax, eax
je 0x405a42
lea eax, [esp + 0x1bc]
push eax
push ecx
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], esp
mov ecx, esp
push eax
call fcn.00409f8c
call fcn.00404d9f
test eax, eax
je 0x405a42
push 0x10
pop ecx
lea edi, [esp + 0x1ac]
lea esi, [esp + 0x1bc]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4059cb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405a42
push 0x46147c
call fcn.004135a6
pop ecx
push 0x4614bc
push dword [esp + 0x14]
call sub.IMM32.dll_ImmInstallIMEA
mov dword [ebx + 0xf0], eax
test eax, eax
jne 0x405a9e
xor esi, esi
push esi
push esi
lea eax, [esp + 0x1c]
push eax
push esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x405a24
mov eax, str.unknow
push eax
push 0x4614d4
push dword [esp + 0x2c]
call fcn.00409ca8
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x405a73
push 0
push dword [esp + 0x14]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4059da
mov esi, dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x461498
push dword [esp + 0x30]
call fcn.00409ca8
add esp, 0x10
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.0040a004
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.0040a004
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.0040a004
xor eax, eax
jmp 0x405bd2
xor edi, edi
cmp dword [ebx + 0x288], edi
jne 0x405bab
push str.ime_config_ini
push 0x204
push edi
push 4
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebx + 0x288], eax
cmp eax, edi
je 0x405af1
push edi
push edi
push edi
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x14], eax
cmp eax, edi
jne 0x405b38
push dword [ebx + 0x288]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x288], edi
push edi
push edi
lea eax, [esp + 0x28]
push eax
push edi
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [esp + 0x20]
cmp eax, edi
jne 0x405b1d
mov eax, str.unknow
push eax
push str._:__s
push dword [esp + 0x2c]
call fcn.00409ca8
add esp, 0xc
push dword [esp + 0x20]
jmp 0x405a3a
add ebx, 0xc0
cmp dword [ebx + 0x18], 0x10
jb 0x405b49
mov ebx, dword [ebx + 4]
jmp 0x405b4c
add ebx, 4
push ebx
mov esi, 0x460f1c
push esi
lea eax, [esp + 0x174]
push 0x40
push eax
call fcn.00438095
mov ecx, dword [esp + 0x38]
add esp, 0x10
call fcn.00407213
push eax
push esi
lea eax, [esp + 0x74]
push pe_nt_image_headers32
push eax
call fcn.00438095
push str.TianLongBaBu_WndClass
push esi
lea eax, [esp + 0x44]
push 0x40
push eax
call fcn.00438095
mov edi, dword [esp + 0x34]
add esp, 0x20
push 0x60
pop ecx
push dword [esp + 0x14]
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.0040a004
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.0040a004
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.0040a004
xor eax, eax
inc eax
mov ecx, dword [esp + 0x2e0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c8]
xor ecx, esp
call fcn.004363af
mov esp, ebp
pop ebp
ret 4