Function at 0x40e857
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10030
call fcn.00417db0
push ebx
push esi
mov dword [ebp - 8], ecx
mov esi, 0x42b598
push edi
push esi
lea ecx, [ebp - 0x28]
call fcn.00401000
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401000
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
xor ebx, ebx
push eax
push ebx
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
sub esp, 0xc
mov ecx, esp
push eax
call fcn.00401000
mov ecx, dword [ebp - 8]
call fcn.0040e41d
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040e480
test al, al
je 0x40ebd0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0x20006
push ebx
push esi
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40e8f9
mov ecx, dword [ebp + 0xc]
push ebx
call fcn.00401aa7
xor esi, esi
jmp 0x40ebe2
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
call fcn.00417850
mov dword [esp], str.REG_EXPAND_SZ
push 2
pop ebx
mov ecx, edi
push ebx
mov esi, eax
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
call fcn.004203e0
pop ecx
test eax, eax
pop ecx
jne 0x40e9a1
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
lea eax, [ebp - 0x10030]
push eax
call fcn.00417750
pop ecx
inc esi
pop ecx
push esi
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
push ebx
xor esi, esi
push esi
push 1
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40e993
mov ecx, dword [ebp + 0xc]
push esi
call fcn.00401aa7
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40ebe2
push str.REG_SZ
push ebx
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
call fcn.004203e0
pop ecx
test eax, eax
pop ecx
jne 0x40e9fa
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
lea eax, [ebp - 0x10030]
push eax
call fcn.00417750
pop ecx
inc esi
pop ecx
push esi
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
push 1
jmp 0x40e969
push str.REG_MULTI_SZ
push ebx
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
call fcn.004203e0
pop ecx
test eax, eax
pop ecx
jne 0x40ea91
push 0x10000
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
lea eax, [ebp - 0x10030]
push eax
call fcn.0041631d
lea eax, [ebp - 0x10030]
push eax
call fcn.00417850
and byte [ebp + eax - 0x10030], 0
and byte [ebp + eax - 0x1002f], 0
xor esi, esi
add esp, 0x10
xor edx, edx
cmp eax, esi
jle 0x40ea7e
cmp byte [ebp + edx - 0x10030], 0xa
lea ecx, [ebp + edx - 0x10030]
jne 0x40ea77
and byte [ecx], 0
inc edx
cmp edx, eax
jl 0x40ea63
cmp eax, esi
je 0x40ea82
add eax, ebx
push eax
lea eax, [ebp - 0x10030]
push eax
push 7
jmp 0x40e96b
push str.REG_DWORD
push ebx
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
call fcn.004203e0
pop ecx
test eax, eax
pop ecx
jne 0x40ead1
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018d3
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push 4
push eax
push 4
jmp 0x40e969
push str.REG_BINARY
push ebx
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
call fcn.004203e0
pop ecx
test eax, eax
pop ecx
jne 0x40ebc7
push 3
mov ecx, edi
call fcn.00402301
mov ecx, eax
call fcn.004018ad
mov dword [ebp - 8], eax
mov eax, esi
cdq
idiv ebx
test edx, edx
jne 0x40ebc0
xor ebx, ebx
cmp esi, ebx
mov dword [ebp + 8], ebx
jle 0x40eb7c
cmp dword [ebp + 8], 0xffff
jge 0x40eb7c
push 0x10
xor ecx, ecx
pop edx
mov eax, dword [ebp - 8]
mov al, byte [eax + ebx]
cmp al, 0x30
jl 0x40eb42
cmp al, 0x39
jg 0x40eb42
movsx eax, al
sub eax, 0x30
jmp 0x40eb60
cmp al, 0x41
jl 0x40eb52
cmp al, 0x46
jg 0x40eb52
movsx eax, al
sub eax, 0x37
jmp 0x40eb60
cmp al, 0x61
jl 0x40ebc0
cmp al, 0x66
jg 0x40ebc0
movsx eax, al
sub eax, 0x57
imul eax, edx
add ecx, eax
inc ebx
sub edx, 0xf
jns 0x40eb2c
mov eax, dword [ebp + 8]
inc dword [ebp + 8]
cmp ebx, esi
mov byte [ebp + eax - 0x10030], cl
jl 0x40eb1e
push dword [ebp + 8]
lea eax, [ebp - 0x10030]
mov ecx, edi
push eax
push 3
push 0
push 1
call fcn.00402301
mov ecx, eax
call fcn.004018ad
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40ebb2
mov ecx, dword [ebp + 0xc]
push 0
call fcn.00401aa7
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e8f2
xor esi, esi
jmp 0x40e98a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 8]
push 1
pop esi
push 0xffffffffffffffff
push 0x89
call fcn.004027ec
lea ecx, [ebp - 0x1c]
call fcn.0040107a
lea ecx, [ebp - 0x28]
call fcn.0040107a
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8