Function at 0x403870
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov dword [ebp - 0x234], edx
mov dword [ebp - 0x23c], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x240], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x238], edi
push 0
mov dword [ebp - 0x230], eax
mov edi, 1
xor al, al
mov byte [ebp - 0x229], al
lea eax, [ebp - 0x228]
push eax
push 0
push 0x20007
push 0
push 0
push 0
push str.SoftwareScanmatikSm2PtConfig
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test ebx, ebx
je 0x4038f8
lea eax, [edi + 0xd]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x229]
mov esi, 2
test al, al
jne 0x403b3d
test ebx, ebx
jne 0x4039aa
push esi
push str.DeviceId__d
lea eax, [ebp - 0x214]
push 0x104
push eax
call fcn.004019b0
add esp, 0x10
mov dword [ebp - 0x218], 4
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
push eax
push ebx
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
jne 0x40398f
cmp dword [ebp - 0x220], 4
jne 0x40398f
mov eax, dword [ebp - 0x234]
mov edi, esi
cmp dword [ebp - 0x21c], eax
jne 0x40398f
mov al, 1
mov dword [ebp - 0x238], esi
mov byte [ebp - 0x229], al
jmp 0x403995
mov al, byte [ebp - 0x229]
inc esi
cmp esi, 0xff
jbe 0x403903
test al, al
jne 0x403b3d
cmp edi, 0xff
jae 0x403a1f
inc edi
lea eax, [ebp - 0x214]
push edi
push str.DeviceId__d
push 0x104
push eax
call fcn.004019b0
mov eax, dword [ebp - 0x234]
add esp, 0x10
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x21c]
push 4
push eax
push 4
push 0
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x403a10
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
jmp 0x403b61
mov dword [ebp - 0x230], 0xf
jmp 0x403b3d
mov edi, 2
test al, al
jne 0x403b3d
test ebx, ebx
jne 0x403b3d
push edi
push str.DeviceId__d
lea eax, [ebp - 0x214]
push 0x104
push eax
call fcn.004019b0
add esp, 0x10
mov dword [ebp - 0x21c], 4
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x224]
push eax
push ebx
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
jne 0x403b20
mov edx, dword [ebp - 0x23c]
xor al, al
xor ecx, ecx
mov esi, dword [edx + 8]
mov dword [ebp - 0x218], esi
test esi, esi
je 0x403ad2
xor edx, edx
test al, al
jne 0x403b2a
mov eax, dword [ebp - 0x23c]
mov esi, dword [ebp - 0x220]
mov eax, dword [eax + 0x10]
cmp dword [edx + eax + 4], esi
sete al
inc ecx
add edx, 0x18
cmp ecx, dword [ebp - 0x218]
jb 0x403aa4
test al, al
jne 0x403b2a
mov eax, dword [ebp - 0x234]
push 4
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x218]
push eax
push 4
push 0
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test ebx, ebx
jne 0x403b14
mov al, 1
mov dword [ebp - 0x238], edi
mov byte [ebp - 0x229], al
jmp 0x403b30
mov dword [ebp - 0x230], 0xf
jmp 0x403b2a
mov dword [ebp - 0x230], 0x10
mov al, byte [ebp - 0x229]
inc edi
cmp edi, 0xff
jbe 0x403a24
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x230]
test ecx, ecx
jne 0x403b6d
cmp byte [ebp - 0x229], cl
je 0x403b80
mov edi, dword [ebp - 0x238]
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x403b6d
mov dword [eax], edi
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, 0x11
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422009
mov esp, ebp
pop ebp
ret