Function at 0x404188
Capabilities:
Get common file path
Get geographical location
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a4
push ebx
push esi
push edi
mov bx, dx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
mov dword [0x41cc2c], eax
mov word [0x41cc24], ax
mov edi, 0x41cc20
lea eax, [ebp - 0x194]
mov dword [0x41cc28], esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push eax
call esi
lea eax, [ebp - 0x114]
push edi
push eax
call esi
cmp dword [ebp + 0x18], 0
je 0x40430c
push dword [ebp + 0x18]
mov ebx, 0x104
lea eax, [ebp - 0x114]
push ebx
push eax
push str.Auto
push str.Language
push 0x418358
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push dword [ebp + 0x10]
lea edx, [ebp - 0x194]
lea ecx, [ebp - 0x114]
push dword [ebp + 0x14]
call fcn.00404442
mov dword [ebp - 4], eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x39c]
push eax
call esi
lea eax, [ebp - 0x10]
push 3
push dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
and byte [ebp - 0xe], 0
lea eax, [ebp - 0x10]
push 0x418424
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x404260
lea eax, [ebp - 0x39c]
push 0x418420
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp + 0x18]
lea eax, [ebp - 0x298]
push ebx
push eax
lea eax, [ebp - 0x39c]
push edi
push eax
push 0x418358
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4042af
push 0x5c
push dword [ebp + 0x18]
call fcn.0040d260
pop ecx
test eax, eax
pop ecx
je 0x4042a2
inc eax
jmp 0x4042a5
mov eax, dword [ebp + 0x18]
lea ecx, [ebp - 0x298]
push ecx
push eax
call esi
lea eax, [ebp - 0x114]
push str.English
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4042fc
push dword [ebp + 0x18]
lea eax, [ebp - 0x298]
push ebx
push eax
push edi
lea eax, [ebp - 0x114]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [ebp - 0x298], 0
jne 0x4042fc
lea eax, [ebp - 0x114]
push str.English
push eax
call esi
jmp 0x4041fe
mov edx, dword [ebp + 0x18]
lea ecx, [ebp - 0x114]
call fcn.0040416b
jmp 0x404368
test bx, bx
je 0x404320
movzx eax, bx
mov word [0x41cc24], bx
mov dword [0x41cc2c], eax
mov eax, dword [0x41cc24]
mov edi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
and ax, 0x3ff
push 0x80
mov word [0x41cd34], ax
lea eax, [ebp - 0x194]
push eax
push 0x40000003
push dword [0x41cc2c]
call edi
mov ebx, 0x104
lea eax, [ebp - 0x114]
push ebx
push eax
push 0x40001001
push dword [0x41cc2c]
call edi
lea eax, [ebp - 0x194]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call edi
add esp, 0xc
lea eax, [ebp - 0x4a0]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x298]
push str._shelp
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x298]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.SHELL32.dll_FindExecutableA]
cmp eax, 0x20
ja 0x404403
push 0x418414
lea eax, [ebp - 0x5a4]
push dword [ebp + 0x14]
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x5a4]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x404403
and dword [ebp - 4], 0
lea eax, [ebp - 0x5a4]
push eax
mov word [0x41cd34], 9
push dword [ebp + 0x10]
call esi
lea eax, [ebp - 0x114]
push eax
push 0
call fcn.0040d287
pop ecx
pop ecx
push dword [0x41cc2c]
call dword [sym.imp.KERNEL32.dll_SetThreadLocale]
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x194]
push eax
push dword [ebp + 0xc]
call esi
mov ax, word [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x14