Function at 0x405fa0
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x590578]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x414]
push eax
push dword [0x59b124]
mov dword [0x599698], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str..ini
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406009
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005175f7
mov esp, ebp
pop ebp
ret
push esi
xor eax, eax
push 0x208
push eax
push 0x59ab18
mov word [0x59b138], ax
mov word [0x59b578], ax
mov word [0x599acc], ax
call fcn.00519270
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.LANGID
push str.INFO
mov dword [0x59b164], 0
call esi
cmp word [ebp - 0x20c], 0
je 0x406101
push 0
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00518671
add esp, 0xc
mov word [0x59b578], ax
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.SUBLANGID
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
je 0x406101
push 0
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00518671
add esp, 0xc
mov word [0x599acc], ax
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.PRINTER
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
jne 0x406112
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005175f7
mov esp, ebp
pop ebp
ret
push ebx
push edi
mov ecx, 0x59ab18
lea edi, [ebp - 0x20c]
xor ebx, ebx
mov edx, 0x104
sub edi, ecx
jmp 0x406130
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40614e
movzx eax, word [edi + ecx]
test ax, ax
je 0x40614e
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x406130
jmp 0x406152
test edx, edx
jne 0x40615a
sub ecx, 2
mov ebx, 0x8007007a
xor eax, eax
mov word [ecx], ax
test ebx, ebx
js 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.RTLREADING
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
je 0x4064a1
push 0xa
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00518659
mov dword [0x59b164], eax
mov eax, dword [0x599acc]
shl eax, 8
or eax, dword [0x59b578]
add esp, 0xc
mov word [0x59b138], ax
lea eax, [ebp - 0x414]
push eax
push 0x104
push 0x598240
push 0x5705c8
push 0x570d68
push str.INFO
call esi
cmp word [0x598240], 0
je 0x4064a1
mov ecx, 0x598240
call fcn.00405f60
test eax, eax
je 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
push 0x599ad0
push 0x5705c8
push str.URL4URAL
push str.INFO
mov dword [0x5998bc], 1
call esi
cmp word [0x599ad0], 0
jne 0x406249
mov dword [0x5998bc], 0
jmp 0x406266
mov ecx, 0x599ad0
call fcn.00405f60
mov ecx, dword [0x5998bc]
xor edx, edx
test eax, eax
cmove ecx, edx
mov dword [0x5998bc], ecx
lea eax, [ebp - 0x414]
push eax
push 8
push 0x59b128
push 0x5705c8
push str.AREA
push str.INFO
call esi
cmp word [0x59b128], 0
je 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
push 0x59b370
push 0x5705c8
push str.GDIDRVNAME
push str.INFO
call esi
cmp word [0x59b370], 0
je 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
push 0x5996a0
push 0x5705c8
push str.DEVICEID
push str.INFO
call esi
cmp word [0x5996a0], 0
je 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.IJPLMLOGNAME
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
je 0x4064a1
mov ecx, 0x599490
lea edi, [ebp - 0x20c]
xor ebx, ebx
mov edx, 0x104
sub edi, ecx
lea esp, [esp]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40635e
movzx eax, word [edi + ecx]
test ax, ax
je 0x40635e
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x406340
jmp 0x406362
test edx, edx
jne 0x40636a
sub ecx, 2
mov ebx, 0x8007007a
xor eax, eax
mov word [ecx], ax
test ebx, ebx
js 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.IJPLMREGPATH
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
je 0x4064a1
mov ecx, 0x5998c0
lea edi, [ebp - 0x20c]
xor ebx, ebx
mov edx, 0x104
sub edi, ecx
lea ecx, [ecx]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x4063de
movzx eax, word [edi + ecx]
test ax, ax
je 0x4063de
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x4063c0
jmp 0x4063e2
test edx, edx
jne 0x4063ea
sub ecx, 2
mov ebx, 0x8007007a
xor eax, eax
mov word [ecx], ax
test ebx, ebx
js 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.IJPLMREGKEY
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
je 0x4064a1
mov ecx, 0x59b168
lea edi, [ebp - 0x20c]
xor ebx, ebx
mov edx, 0x104
sub edi, ecx
lea esp, [esp]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40645e
movzx eax, word [edi + ecx]
test ax, ax
je 0x40645e
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x406440
jmp 0x406462
test edx, edx
jne 0x40646a
sub ecx, 2
mov ebx, 0x8007007a
xor eax, eax
mov word [ecx], ax
test ebx, ebx
js 0x4064a1
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5705c8
push str.CDTYPE
push str.INFO
call esi
cmp word [ebp - 0x20c], 0
jne 0x4064b4
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005175f7
mov esp, ebp
pop ebp
ret
mov esi, 1
mov ecx, 0x570ca8
lea eax, [ebp - 0x20c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4064ea
test dx, dx
je 0x4064e6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4064ea
add eax, 4
add ecx, 4
test dx, dx
jne 0x4064c4
xor eax, eax
jmp 0x4064ef
sbb eax, eax
or eax, 1
xor ecx, ecx
test eax, eax
cmove esi, ecx
mov ecx, str.USCD
lea eax, [ebp - 0x20c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406527
test dx, dx
je 0x406523
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406527
add eax, 4
add ecx, 4
test dx, dx
jne 0x406501
xor eax, eax
jmp 0x40652c
sbb eax, eax
or eax, 1
mov ecx, 2
test eax, eax
cmove esi, ecx
lea eax, [ecx - 1]
mov ecx, dword [ebp - 4]
pop edi
pop ebx
mov dword [0x599698], esi
xor ecx, ebp
pop esi
call fcn.005175f7
mov esp, ebp
pop ebp
ret