Function at 0x401000
Capabilities:
Get common file path
Read .ini file

Disassembly:
sub esp, 0xb5c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0xb58], eax
push ebx
push ebp
mov ebp, dword [esp + 0xb70]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
lea eax, [esp + 0x238]
push eax
push 0x104
call esi
lea eax, [esp + 0x238]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401040
sub eax, edx
sar eax, 1
mov ebx, 0x5c
cmp word [esp + eax*2 + 0x236], bx
je 0x401084
lea edi, [esp + 0x238]
add edi, 0xfffffffe
jmp 0x401070
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401070
mov ecx, dword [0x408274]
mov dword [edi], ecx
lea eax, [esp + 0x238]
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x401090
mov edx, dword [str.Lang.txt]
mov ecx, dword [0x408264]
mov dword [eax], edx
mov edx, dword [0x408268]
mov dword [eax + 4], ecx
mov ecx, dword [0x40826c]
mov dword [eax + 8], edx
mov dx, word [0x408270]
mov dword [eax + 0xc], ecx
mov word [eax + 0x10], dx
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx eax, ax
push 0xa
lea ecx, [esp + 0x644]
movzx edx, ax
push ecx
push edx
call fcn.0040132c
add esp, 0xc
lea eax, [esp + 0x238]
push eax
push 0x104
lea ecx, [esp + 0x440]
push ecx
push str.Failed
lea edx, [esp + 0x650]
push edx
push str.LANGUAGES
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, str.Failed
lea eax, [esp + 0x438]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401148
test dx, dx
je 0x401144
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401148
add eax, 4
add ecx, 4
test dx, dx
jne 0x401122
xor eax, eax
jmp 0x40114d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401168
movzx ecx, word [eax + str.English]
mov word [esp + eax + 0x438], cx
add eax, 2
test cx, cx
jne 0x401151
push 0x104
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.00401370
add esp, 0xc
lea ecx, [esp + 0x38]
push ecx
push 0x104
call esi
lea eax, [esp + 0x38]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401190
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x36], bx
je 0x4011c4
lea edi, [esp + 0x38]
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4011b0
mov edx, dword [0x408274]
mov dword [edi], edx
lea eax, [esp + 0x438]
mov edx, eax
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4011d0
lea edi, [esp + 0x38]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4011e4
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x38]
add edi, 0xfffffffe
jmp 0x401210
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401210
mov ecx, 6
mov esi, str._strings.dll
rep movsd dword es:[edi], dword [esi]
push 2
push 0
lea eax, [esp + 0x40]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, dword [sym.imp.USER32.dll_MessageBoxW]
mov esi, eax
test esi, esi
jne 0x401255
push 0x10
push str.Error
push str.Unable_to_load_String_resourcse._r_nPlease_run_Setup.exe_again_from_the_CD_provided_with_your_Printer.
push 0
call ebx
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x190
lea ecx, [esp + 0x14]
push ecx
push 0x205
push esi
call edi
push ebp
call fcn.004012cd
add esp, 4
push 0x190
lea edx, [esp + 0x84c]
push edx
push eax
push esi
call edi
push 0x10
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x850]
push ecx
push 0
call ebx
mov ecx, dword [esp + 0xb68]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00401356
add esp, 0xb5c
ret 0x10