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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x62c
mov eax, dword [0x427178]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
mov esi, ecx
lea eax, [ebp - 0x20a]
mov dword [ebp - 0x624], edx
push eax
mov dword [ebp - 0x62c], esi
mov dword [ebp - 0x628], edi
call fcn.00418440
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.00418440
add esp, 0x18
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x403300
cmp eax, 0x104
ja 0x403300
push ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x20c]
push str.twain_32
push eax
call ebx
test eax, eax
je 0x40329c
push esi
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x40329c
push str._SETSCN_.ini
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x40329c
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0x423854
push 0x423888
push str.Registry
call esi
test eax, eax
jne 0x40329c
lea eax, [ebp - 0x20c]
push eax
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0x423854
push 0x423888
push str.Registry2
call esi
test eax, eax
je 0x40323a
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.00418440
push 0xffffffffffffffff
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push 0x104
push eax
call fcn.0040fda8
lea eax, [ebp - 0x61c]
push 0x2c
push eax
call fcn.0040fcde
mov esi, eax
add esp, 0x24
test esi, esi
je 0x40323a
lea ecx, [esi + 2]
push ecx
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00410465
xor eax, eax
add esp, 0xc
mov word [esi], ax
mov edi, str.HKCR
xor esi, esi
lea ecx, [ecx]
lea eax, [ebp - 0x61c]
mov ecx, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40321e
test dx, dx
je 0x40321a
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40321e
add ecx, 4
add eax, 4
test dx, dx
jne 0x4031f8
xor eax, eax
jmp 0x403223
sbb eax, eax
or eax, 1
test eax, eax
je 0x4032af
inc esi
add edi, 0x10
cmp esi, 4
jb 0x4031f0
mov edi, dword [ebp - 0x628]
push 0xffffffffffffffff
push 0x423dd0
push 0x104
push edi
call fcn.0040fda8
add esp, 0x10
push str.ScanGear
push edi
call ebx
push str.Devices
push edi
call ebx
push dword [ebp - 0x62c]
push edi
call ebx
mov ecx, dword [ebp - 0x624]
lea eax, [ebp - 0x620]
push eax
push 0x20019
push 0
push edi
push 0x80000002
mov dword [ecx], 0x80000002
mov dword [ebp - 0x620], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4032f2
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f324
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x624]
shl esi, 4
push 0xffffffffffffffff
mov eax, dword [esi + 0x4281ec]
mov dword [ecx], eax
lea eax, [ebp - 0x414]
push eax
push 0x104
push dword [ebp - 0x628]
call fcn.0040fda8
add esp, 0x10
pop ebx
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f324
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x620]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4032dc
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.0040f324
mov esp, ebp
pop ebp
ret