Function at 0x404841
Capabilities:
Get common file path
Query or enumerate registry value
Read file on windows
Set registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
push ebx
push esi
push edi
jmp 0x40485f
mov byte [ebp - 0xdc], 0
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0xdb]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 8], 0x40
mov dword [ebp - 0x54], 0
lea eax, [ebp - 0x60]
push eax
push str.Software_nmsrfInputMethod
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0xdc]
push edx
lea eax, [ebp - 0x54]
push eax
push 0
push 0x40d2f0
mov ecx, dword [ebp - 0x60]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 0x60]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.004041f3
mov dword [ebp - 0x50], 0
lea eax, [ebp - 0xdc]
push eax
lea ecx, [ebp - 0x98]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
lea edx, [ebp - 0x98]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x9c], 0
jmp 0x404913
mov eax, dword [ebp - 0x9c]
add eax, 1
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x5c]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x9c], eax
jge 0x40494c
mov ecx, dword [ebp - 0x5c]
sub ecx, dword [ebp - 0x9c]
lea edx, [ebp + ecx - 0x99]
push edx
mov eax, dword [ebp - 0x9c]
lea ecx, [ebp + eax - 0x98]
push ecx
call fcn.004041d1
add esp, 8
jmp 0x404904
lea edx, [ebp - 0x98]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp - 0x50], eax
push 0x32
push 0
lea eax, [ebp - 0x98]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x50]
xor ecx, 0x80478008
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
cmp edx, dword [0x40dd2c]
jne 0x404998
mov dword [0x40e178], 1
jmp 0x404c2e
mov dword [ebp - 0x50], 0
push 0x32
push 0
lea eax, [ebp - 0x98]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x64], 0
mov dword [ebp - 0xe0], 4
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x1ec]
push ecx
push 0x40d2f4
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x404a1f
lea edx, [ebp - 0x1ec]
push edx
push str.SoftwareApplicationld
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
push 4
lea eax, [ebp - 0x4c]
push eax
push 4
push 0
push 0x40d324
mov ecx, dword [ebp - 0x1ec]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [ebp - 0xe0]
push edx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x58]
push ecx
push 0
push str.Seriall
mov edx, dword [ebp - 0x1ec]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [ebp - 0x1ec]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebp - 0x1e8], eax
mov byte [ebp - 0x22c], 0
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0x22b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea ecx, [ebp - 0x1e4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str.Program_FilesCommon_FilesMicrosoft_Sharedldsuf.dat
push 0x5c
lea edx, [ebp - 0x1e4]
push edx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
push eax
call sub.MSVCRT.dll_strcpy
add esp, 8
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [ebp - 0x1e4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x404afe
push 0
lea ecx, [ebp - 0x230]
push ecx
push 0x40
lea edx, [ebp - 0x22c]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404ba0
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x1e4]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0xffffffff
je 0x404ba0
mov byte [ebp - 0x278], 0
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0x277]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp - 0x4c]
push eax
push 0x40d36c
lea ecx, [ebp - 0x278]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
lea edx, [ebp - 0x238]
push edx
push 0x40
lea eax, [ebp - 0x278]
push eax
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x22c]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
mov edx, dword [ebp - 0x64]
push edx
push 0x40d370
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x22c]
push ecx
lea edx, [ebp - 0x48]
push edx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
je 0x404bd7
mov dword [0x40e174], 1
mov eax, dword [ebp - 0x1e8]
sub eax, dword [ebp - 0x64]
xor edx, edx
mov ecx, 0x15180
div ecx
mov dword [0x40dd14], eax
cmp dword [0x40dd14], 7
jg 0x404c19
push 0
push 0x404608
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
push 0x3e8
mov edx, dword [0x40e3a8]
push edx
call dword [sym.imp.USER32.dll_DialogBoxParamA]
jmp 0x404c1e
call fcn.004046e4
jmp 0x404c2e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret