Function at 0x40c105
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [0x452040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ecx
call fcn.004231d0
mov ebx, eax
push 0x2c
mov al, byte [ebx]
lea edi, [ebx + 1]
mov byte [ebp - 0x311], al
mov al, byte [edi]
inc edi
push edi
mov byte [ebp - 0x312], al
call fcn.00420790
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40c276
mov byte [esi], 0
inc esi
push 0x2c
push esi
call fcn.00420790
add esp, 8
test eax, eax
je 0x40c0bd
mov byte [eax], 0
movsx eax, byte [ebp - 0x312]
push esi
push eax
mov dword [ebp - 0x320], eax
lea eax, [ebp - 0x310]
push str._c_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
movsx eax, byte [ebp - 0x311]
add esp, 0x10
add eax, 0xffffffcf
cmp eax, 3
ja case.default.0x40c0f0
jmp dword [eax*4 + 0x40c30c]
mov eax, closesocket
jmp 0x40c115
mov eax, closesocket
jmp 0x40c115
mov eax, closesocket
jmp 0x40c115
mov eax, reloc.WSOCK32.dll_closesocket
jmp 0x40c115
xor eax, eax
lea ecx, [ebp - 0x318]
push ecx
push 0xf003f
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c282
lea eax, [ebp - 0x31c]
mov dword [ebp - 0x31c], 0x104
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push str.SignatureOrder
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c276
push dword [ebp - 0x320]
lea eax, [ebp - 0x108]
push eax
call fcn.00420790
mov edx, eax
add esp, 8
test edx, edx
je 0x40c276
mov al, byte [edx + 1]
lea edi, [edx + 1]
mov ecx, edi
mov byte [ebp - 0x311], al
lea eax, [ecx + 1]
mov dword [ebp - 0x320], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c1a0
sub ecx, dword [ebp - 0x320]
lea eax, [ecx + 1]
push eax
push edi
push edx
call fcn.00422210
lea ecx, [ebp - 0x108]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c1c4
sub ecx, edx
je 0x40c2c9
cmp byte [ebp - 0x311], al
jne 0x40c2c9
movsx eax, byte [ebp + ecx - 0x109]
push esi
push eax
lea eax, [ebp - 0x20c]
push str._c_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [ebp - 0x31c], 0
lea eax, [ebp - 0x31c]
push eax
push 0
lea eax, [ebp - 0x320]
push eax
push 0
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c276
push dword [ebp - 0x31c]
call fcn.00429ee5
mov edi, eax
add esp, 4
test edi, edi
je 0x40c276
lea eax, [ebp - 0x31c]
push eax
push edi
lea eax, [ebp - 0x320]
push eax
push 0
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40c29e
push edi
call fcn.00427f49
add esp, 4
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call fcn.00427f49
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f127
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x31c]
push edi
push dword [ebp - 0x320]
push 0
push esi
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edi
mov esi, eax
call fcn.00427f49
add esp, 4
test esi, esi
jne 0x40c276
lea eax, [ebp - 0x310]
push eax
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x40c276
push ebx
call fcn.00427f49
add esp, 4
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
neg eax
pop edi
sbb eax, eax
xor ecx, ebp
pop esi
inc eax
pop ebx
call fcn.0041f127
mov esp, ebp
pop ebp
ret