Function at 0x402410
Capabilities:
Extract resource via kernel32 functions
Query or enumerate registry value
Read file on windows
Set registry value

Disassembly:
mov eax, 0x2016c
call fcn.00403610
mov al, byte [0x405988]
push ebx
push esi
push edi
mov byte [esp + 0x178], al
mov ecx, 0x7fff
xor eax, eax
lea edi, [esp + 0x179]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x40503c]
test eax, eax
je 0x40253b
lea ecx, [esp + 0x74]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x74]
push 0x5c
push edx
call sub.MSVCRT.dll__mbsrchr
mov byte [eax], 0
mov edi, str.EncryptKey.txt
or ecx, 0xffffffff
xor eax, eax
add esp, 8
lea edx, [esp + 0x74]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0x80
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
mov edi, 0x426204
rep stosd dword es:[edi], eax
push eax
push 1
lea eax, [esp + 0x88]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
jne 0x4024e5
push str.Can_t_find_EncryptKey.txt_
call fcn.00401000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x2016c
ret
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x74]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x78]
push ecx
push 0x104
push eax
push edx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x74]
push ecx
push str.Software_s
push 0x426484
call sub.MSVCRT.dll_sprintf
mov ecx, 0x40
lea esi, [esp + 0x80]
mov edi, 0x426204
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x74]
push 0x4053bc
push 0x67
push eax
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, 0x8000
lea edi, [esp + 0x178]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov dl, byte [eax + 0x426209]
mov cl, byte [eax + 0x426204]
add dl, cl
mov byte [eax + 0x426218], dl
mov cl, byte [eax + 0x426213]
add cl, byte [eax + 0x42620e]
mov byte [eax + 0x42621c], cl
inc eax
cmp eax, 4
jl 0x40257c
xor eax, eax
mov edx, eax
and edx, 0x80000007
jns 0x4025b9
dec edx
or edx, 0xfffffff8
inc edx
mov cl, byte [edx + 0x426218]
mov bl, byte [esp + eax + 0x178]
xor bl, cl
mov byte [esp + eax + 0x178], bl
inc eax
cmp eax, 0x20000
jb 0x4025aa
xor eax, eax
mov bl, byte [esp + eax + 0x178]
or dl, 0xff
sub dl, bl
mov byte [esp + eax + 0x178], dl
inc eax
cmp eax, 0x20000
jb 0x4025d9
xor eax, eax
mov cl, byte [eax + 0x426213]
mov dl, byte [eax + 0x426204]
add cl, dl
mov byte [eax + 0x426222], cl
mov dl, byte [eax + 0x42620e]
add dl, byte [eax + 0x426209]
mov byte [eax + 0x426226], dl
inc eax
cmp eax, 4
jl 0x4025f6
xor eax, eax
mov ecx, eax
and ecx, 0x80000007
jns 0x402633
dec ecx
or ecx, 0xfffffff8
inc ecx
mov dl, byte [ecx + 0x426222]
mov bl, byte [esp + eax + 0x178]
xor bl, dl
mov byte [esp + eax + 0x178], bl
inc eax
cmp eax, 0x20000
jb 0x402624
mov ecx, 0x8000
lea esi, [esp + 0x178]
mov edi, 0x405998
rep movsd dword es:[edi], dword [esi]
cmp byte [0x4059a8], 0xab
jne 0x402a40
cmp byte [0x4059a9], 0x56
jne 0x402a40
cmp byte [0x4059aa], 0xce
jne 0x402a40
cmp byte [0x4059ab], 0x58
jne 0x402a40
cmp word [0x4059db], 0
je 0x4026ef
mov eax, dword [0x4059d8]
xor ecx, ecx
xor edx, edx
mov cl, ah
mov dl, byte [0x4059d7]
and eax, 0xff
push ecx
add edx, 0x7d0
push eax
push edx
call fcn.004021f0
xor ecx, ecx
add esp, 0xc
mov cx, word [0x4059db]
cmp eax, ecx
jb 0x4026ef
push str.SoftError_0x82__
call fcn.00401000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x2016c
ret
mov al, byte [0x4059dd]
test al, al
je 0x402733
push 0
push 0
call fcn.00402310
add esp, 8
mov ecx, 3
mov edi, 0x4059de
mov esi, 0x4264ec
xor edx, edx
repe cmpsw word [esi], word es:[edi]
je 0x402733
push str.SoftError_0x83__
call fcn.00401000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x2016c
ret
cmp word [0x4059d3], 0
je 0x40282d
mov ecx, 0x3f
xor eax, eax
mov edi, 0x426304
push 0x4259b0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x426484
push 0x80000002
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4027d1
push 0x4259bc
push 0x426304
push 0x42599c
push eax
mov eax, dword [0x4259b0]
push 0x40522c
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [0x4259b0]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x426304
call sub.MSVCRT.dll_atoi
xor edx, edx
add esp, 4
mov dx, word [0x4059d3]
mov dword [0x4259b8], eax
cmp eax, edx
jb 0x40282d
push str.SoftError_0x81__
call fcn.00401000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x2016c
ret
mov ecx, 0x3f
xor eax, eax
mov edi, 0x426304
push 0x4259b0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x426484
push 0x80000002
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov edi, 0x426304
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x426304
push 1
push eax
mov eax, dword [0x4259b0]
push 0x40522c
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [0x4259b0]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov al, byte [0x4059d2]
sub eax, 0
je 0x40284c
dec eax
jne 0x402866
mov edx, dword [0x4259ac]
push 1
push 0x285e
push edx
jmp 0x402859
mov eax, dword [0x4259ac]
push 0
push 0x285e
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov al, byte [0x4059d2]
test al, al
jne 0x402880
push 0x405390
lea ecx, [esp + 0x14]
push str.___Interface:__s
push ecx
jmp 0x4028a4
cmp al, 1
jne 0x402895
push str.SerialPort
lea edx, [esp + 0x14]
push str.___Interface:__s
push edx
jmp 0x4028a4
push str.NetPort
lea eax, [esp + 0x14]
push str.___Interface:__s
push eax
call sub.MSVCRT.dll_sprintf
mov ecx, dword [0x4259ac]
mov ebx, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
add esp, 0xc
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push 0xb1
push 0x2860
push ecx
call ebx
mov eax, dword [0x4259ac]
lea edx, [esp + 0x10]
push edx
push 0
push 0xc2
push 0x2860
push eax
call ebx
mov ecx, dword [0x4259ac]
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push 0xb1
push 0x2860
push ecx
call ebx
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x10]
push 0x4059b9
lea edx, [esp + 0x14]
push str.____Version:__s
rep stosd dword es:[edi], eax
push edx
call sub.MSVCRT.dll_sprintf
mov eax, dword [0x4259ac]
add esp, 0xc
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push 0xb1
push 0x2860
push eax
call ebx
mov edx, dword [0x4259ac]
lea ecx, [esp + 0x10]
push ecx
push 0
push 0xc2
push 0x2860
push edx
call ebx
mov eax, dword [0x4259ac]
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push 0xb1
push 0x2860
push eax
call ebx
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x10]
push str.___Version_Info:
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push 0x405154
push ecx
call sub.MSVCRT.dll_sprintf
mov edx, dword [0x4259ac]
add esp, 0xc
mov ecx, 5
mov esi, 0x4059be
push 0xffffffffffffffff
push 0xffffffffffffffff
lea edi, [esp + 0x28]
push 0xb1
push 0x2860
push edx
rep movsd dword es:[edi], dword [esi]
call ebx
lea eax, [esp + 0x10]
push eax
push 0
mov ecx, dword [0x4259ac]
push 0xc2
push 0x2860
push ecx
call ebx
mov edx, dword [0x4259ac]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xb1
push 0x2860
push edx
call ebx
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov eax, dword [0x4059e4]
lea ecx, [esp + 0x10]
push eax
push 0x405340
push ecx
call sub.MSVCRT.dll_sprintf
lea edx, [esp + 0x1c]
push edx
push str.DataLen_:_s
call fcn.00401000
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x24]
add esp, 0x14
rep stosd dword es:[edi], eax
mov eax, dword [0x4259ac]
push 0x4059ac
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x2016c
ret
push str.Fail_to_Unencrypt_
call fcn.00401000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x2016c
ret