Function at 0x40ad30
Capabilities:
Delete registry key
Persist via default file association registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x452040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x174], edx
lea edi, [ecx + 1]
mov esi, ecx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ad51
sub ecx, edi
lea eax, [ecx + 1]
push eax
call fcn.0041f375
mov edx, eax
mov dword [ebp - 0x170], eax
add esp, 4
sub edx, esi
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], cl
test cl, cl
jne 0x40ad70
push 0x2c
push eax
call fcn.00420790
mov edi, eax
push 0x2c
mov byte [edi], 0
inc edi
push edi
call fcn.00420790
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x40adb3
mov byte [ebx], 0
inc ebx
push 0x2c
push ebx
call fcn.00420790
mov esi, eax
add esp, 8
mov byte [esi], 0
inc esi
jmp 0x40adb9
mov esi, dword [ebp - 0x174]
lea eax, [ebp - 0x15c]
push eax
push 0xf003f
push 0
push 0x448908
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b1b6
cmp dword [ebp - 0x174], eax
je 0x40b1f3
lea eax, [ebp - 0x16c]
push eax
push dword [ebp - 0x170]
push dword [ebp - 0x15c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b1aa
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ae11
sub ecx, edx
push ecx
push edi
push 1
push 0
push 0
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40b19e
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x16c]
push eax
push edi
push dword [ebp - 0x15c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
call edi
test eax, eax
jne 0x40b1aa
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ae65
sub ecx, edx
push ecx
push ebx
push 1
push 0
push 0
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40b19e
lea eax, [ebp - 0x168]
push eax
push str.DefaultIcon
push dword [ebp - 0x16c]
call edi
test eax, eax
jne 0x40b19e
lea ebx, [ebp - 0x158]
mov ecx, esi
sub ebx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x40aeb0
lea ecx, [ebp - 0x158]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40aec4
mov ax, word [0x44df10]
mov word [ecx], ax
mov al, byte [0x44df12]
mov byte [ecx + 2], al
lea ecx, [ebp - 0x158]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40aee8
sub ecx, edx
lea eax, [ebp - 0x158]
push ecx
push eax
push 1
push 0
push 0
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40b192
push dword [ebp - 0x168]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
lea eax, [ebp - 0x168]
push eax
push str.Shell
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b19e
lea eax, [ebp - 0x164]
push eax
push str.open
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b192
lea eax, [ebp - 0x160]
push eax
push str.command
push dword [ebp - 0x164]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b18a
mov ecx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x40af83
lea edi, [ebp - 0x158]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40af97
mov eax, dword [0x44df24]
lea ecx, [ebp - 0x158]
mov dword [edi], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40afb1
sub ecx, edx
lea eax, [ebp - 0x158]
push ecx
push eax
push 1
push 0
push 0
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40b182
push dword [ebp - 0x160]
call edi
push dword [ebp - 0x164]
call edi
lea eax, [ebp - 0x164]
push eax
push str.print
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b192
lea eax, [ebp - 0x160]
push eax
push str.command
push dword [ebp - 0x164]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b18a
mov ecx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x40b034
lea ecx, [ebp - 0x158]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40b048
mov eax, dword [str.__p__1]
mov dword [ecx], eax
mov ax, word [0x44df34]
mov word [ecx + 4], ax
mov al, byte [0x44df36]
mov byte [ecx + 6], al
lea ecx, [ebp - 0x158]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b074
sub ecx, edx
lea eax, [ebp - 0x158]
push ecx
push eax
push 1
push 0
push 0
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40b182
push dword [ebp - 0x160]
call edi
push dword [ebp - 0x164]
call edi
lea eax, [ebp - 0x164]
push eax
push str.printto
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b192
lea eax, [ebp - 0x160]
push eax
push str.command
push dword [ebp - 0x164]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40b18a
nop
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ebx + esi - 1], al
test al, al
jne 0x40b0f0
lea ecx, [ebp - 0x158]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40b104
mov eax, dword [str.__t__1_2]
mov dword [ecx], eax
mov eax, dword [0x44df44]
mov dword [ecx + 4], eax
mov ax, word [0x44df48]
mov word [ecx + 8], ax
lea ecx, [ebp - 0x158]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b130
sub ecx, edx
lea eax, [ebp - 0x158]
push ecx
push eax
push 1
push 0
push 0
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40b182
push dword [ebp - 0x160]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
push dword [ebp - 0x164]
call ebx
push dword [ebp - 0x168]
call ebx
push dword [ebp - 0x16c]
call ebx
jmp 0x40b370
push dword [ebp - 0x160]
call edi
push dword [ebp - 0x164]
call edi
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x15c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x174], 0
je 0x40b1d2
push dword [ebp - 0x170]
push str.Unable_to_modify_file_association_key___s_
call fcn.0040a700
add esp, 8
push 1
push dword [ebp - 0x170]
call fcn.0041f367
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0041f127
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x170]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x158]
push edi
push str._s_shellopencommand
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._s_shellopen
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._s_shellprintcommand
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._s_shellprint
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._s_shellprinttocommand
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._s_shellprintto
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._s_shell
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
lea eax, [ebp - 0x158]
push str._sDefaultIcon
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
push edi
push dword [ebp - 0x15c]
call esi
test eax, eax
jne 0x40b1aa
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x15c]
call ebx
test eax, eax
je 0x40b1d2
jmp 0x40b1b6