Function at 0x4789d7
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
mov dword [ebp - 0xac], 0x80
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0x88]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00478c74
add esp, 0xc
test eax, eax
jne 0x478a0f
xor eax, eax
jmp 0x478c70
push 3
push str.EN_EncryptVoucherPath__EN_GetVoucherPathVerify
mov eax, dword [0x50bd20]
mov edx, dword [eax]
mov ecx, dword [0x50bd20]
call dword [edx + 8]
mov eax, dword [ebp - 0xac]
add eax, 1
push eax
call fcn.004a7fba
add esp, 4
mov dword [ebp - 0xb8], eax
mov ecx, dword [ebp - 0xb8]
mov dword [ebp - 0x8c], ecx
mov edx, dword [ebp - 0xac]
push edx
lea eax, [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x8c]
push ecx
call fcn.0048f2e0
add esp, 0xc
mov edx, dword [ebp - 0xac]
add edx, 1
push edx
call fcn.004a7fba
add esp, 4
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 8], eax
mov dword [ebp - 0x90], 2
mov ecx, dword [ebp - 0x8c]
add ecx, dword [ebp - 0xac]
mov dl, byte [ebp - 0x90]
mov byte [ecx], dl
mov dword [ebp - 4], 0
push 0
push 1
push 0x18
lea eax, [ebp - 0xa8]
push eax
call fcn.00476ab0
add esp, 0x10
cmp eax, 0x18
jne 0x478c3a
push 3
push str.EN_EncryptVoucherPath__EN_GetReaderKey
mov ecx, dword [0x50bd20]
mov edx, dword [ecx]
mov ecx, dword [0x50bd20]
call dword [edx + 8]
push 0x1e
push str.yuan_deng_shan_yuan_deng_shan
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x8c]
push edx
mov eax, dword [ebp - 0x90]
push eax
push 0x18
lea ecx, [ebp - 0xa8]
push ecx
call fcn.004738e0
add esp, 0x20
test eax, eax
jle 0x478c3a
push 3
push str.EN_EncryptVoucherPath__b_EncryptDataByRightKey
mov edx, dword [0x50bd20]
mov eax, dword [edx]
mov ecx, dword [0x50bd20]
call dword [eax + 8]
mov dword [ebp - 0xb0], 1
lea ecx, [ebp - 0xb4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x478b7f
lea eax, [ebp - 0xb4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x478b7f
mov dword [ebp - 0xb0], 0
cmp dword [ebp - 0xb0], 0
je 0x478c3a
push 3
push str.EN_EncryptVoucherPath__RegOpenKey
mov edx, dword [0x50bd20]
mov eax, dword [edx]
mov ecx, dword [0x50bd20]
call dword [eax + 8]
mov ecx, dword [ebp - 0xac]
add ecx, 1
push ecx
mov edx, dword [ebp - 8]
push edx
push 3
push 0
push str.code
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xb0], eax
push 4
lea ecx, [ebp - 0x90]
push ecx
push 4
push 0
push str.type
mov edx, dword [ebp - 0xb4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
mov ecx, dword [ebp - 0xb0]
and ecx, eax
mov dword [ebp - 0xb0], ecx
cmp dword [ebp - 0xb0], 0
je 0x478c2d
mov dword [ebp - 4], 1
push 3
push str.EN_EncryptVoucherPath_is_OK
mov edx, dword [0x50bd20]
mov eax, dword [edx]
mov ecx, dword [0x50bd20]
call dword [eax + 8]
mov ecx, dword [ebp - 0xb4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc0], edx
mov eax, dword [ebp - 0xc0]
push eax
call fcn.004a7fe3
add esp, 4
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0xc4], ecx
mov edx, dword [ebp - 0xc4]
push edx
call fcn.004a7fe3
add esp, 4
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret