Function at 0x40d550
Capabilities:
Set registry value

Disassembly:
sub esp, 0xd14
mov eax, dword [esp + 0xd20]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov esi, ecx
xor ebp, ebp
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ebx
jle 0x40d8ac
jmp 0x40d58b
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0xd28]
lea ecx, [esp + 0x524]
push eax
push 0x400
push ecx
mov byte [esp + 0x530], bl
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
lea edx, [esp + 0x524]
mov ecx, esi
push edx
call fcn.0040d900
cmp byte [esp + 0x524], 0x5b
jne 0x40d800
lea eax, [esp + 0x525]
lea ecx, [esp + 0x24]
push eax
push 0x4198d0
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0x5c
push edx
mov byte [esp + ecx + 0x37], bl
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebp, eax
add esp, 0x14
cmp ebp, ebx
je 0x40d894
lea eax, [esp + 0x24]
lea ecx, [esi + 0x6a8]
push eax
push 3
call fcn.00412530
mov byte [ebp], bl
inc ebp
mov esi, str.HKEY_CLASSES_ROOT
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d654
cmp cl, bl
je 0x40d650
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d654
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d630
xor eax, eax
jmp 0x40d659
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d66a
mov dword [esp + 0x10], closesocket
jmp 0x40d894
mov esi, str.HKEY_CURRENT_USER
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d697
cmp cl, bl
je 0x40d693
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d697
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d673
xor eax, eax
jmp 0x40d69c
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d6ad
mov dword [esp + 0x10], htonl
jmp 0x40d894
mov esi, str.HKEY_LOCAL_MACHINE
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d6da
cmp cl, bl
je 0x40d6d6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d6da
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d6b6
xor eax, eax
jmp 0x40d6df
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d6f0
mov dword [esp + 0x10], htonl
jmp 0x40d894
mov esi, str.HKEY_USERS
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d71d
cmp cl, bl
je 0x40d719
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d71d
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d6f9
xor eax, eax
jmp 0x40d722
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d733
mov dword [esp + 0x10], reloc.WS2_32.dll_closesocket
jmp 0x40d894
mov esi, str.HKEY_PERFORMANCE_DATA
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d760
cmp cl, bl
je 0x40d75c
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d760
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d73c
xor eax, eax
jmp 0x40d765
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d776
mov dword [esp + 0x10], htonl
jmp 0x40d894
mov esi, str.HKEY_CURRENT_CONFIG
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d7a3
cmp cl, bl
je 0x40d79f
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d7a3
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d77f
xor eax, eax
jmp 0x40d7a8
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d7b9
mov dword [esp + 0x10], htonl
jmp 0x40d894
mov esi, str.HKEY_DYN_DATA
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40d7e6
cmp cl, bl
je 0x40d7e2
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40d7e6
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40d7c2
xor eax, eax
jmp 0x40d7eb
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d894
mov dword [esp + 0x10], htonl
jmp 0x40d894
lea eax, [esp + 0x18]
lea ecx, [esp + 0x924]
push eax
lea edx, [esp + 0x428]
push ecx
lea eax, [esp + 0x52c]
push edx
push eax
mov ecx, esi
call fcn.0040d950
cmp edi, ebx
je 0x40d894
lea ecx, [esp + 0x14]
push ecx
push ebp
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40d8be
cmp dword [esp + 0x18], 1
jne 0x40d889
lea edx, [esp + 0x924]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
lea edi, [esp + 0x928]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x924]
not ecx
dec ecx
push ecx
push eax
push 1
lea ecx, [esp + 0x430]
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40d8d3
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xd30]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x40d583
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd14
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd14
ret 0xc
call fcn.00406f40
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd14
ret 0xc