Function at 0x10040cc0
Capabilities:
Delete registry value
Resolve function by parsing pe exports
Set registry value

Disassembly:
sub esp, 0x60
mov eax, dword [0x10056a3c]
push ebx
push ebp
mov dword [esp + 0x18], eax
mov ebp, ecx
mov eax, dword [str.fgf.00]
push esi
mov dword [esp + 0x20], eax
mov esi, edx
mov eax, dword [0x10056a44]
mov dword [esp + 0x24], eax
mov eax, dword [0x10056a48]
push 0
mov dword [esp + 0x2c], eax
mov ax, word [0x10056a4c]
mov word [esp + 0x30], ax
lea eax, [esp + 0x14]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareDownloadManagerSpecialData
push reloc.WS2_32.dll_accept
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10040ef3
mov bl, byte [esp + 0x70]
test bl, bl
je 0x10040e9e
push edi
mov edi, dword [0x10059df0]
xor bh, bh
add edi, 0x1ae0
mov byte [esp + 0x13], bh
xor bl, bl
mov edx, dword [edi]
cmp edx, edi
je 0x10040d97
test edx, edx
je 0x10040d97
movzx ebp, word [ebp + 0xe]
mov bh, byte [edx + 0xd]
mov esi, dword [edx + 8]
cmp word [edx + 0xe], bp
je 0x10040e75
mov al, byte [esp + 0x13]
mov edx, dword [edx]
inc al
test bh, bh
movzx ecx, al
movzx eax, byte [esp + 0x13]
cmovne ecx, eax
mov byte [esp + 0x13], cl
mov bh, cl
cmp edx, esi
je 0x10040d97
test edx, edx
jne 0x10040d64
mov ecx, dword [edi + 8]
movzx eax, bh
sub ecx, eax
cmp ecx, 9
jl 0x10040e1c
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea ebx, [ebx]
mov eax, dword [edi]
xor esi, esi
cmp eax, edi
je 0x10040e18
test eax, eax
je 0x10040e18
lea esp, [esp]
cmp byte [eax + 0xd], 0
je 0x10040dd6
test esi, esi
je 0x10040dd4
mov cx, word [esi + 0x12]
cmp cx, word [eax + 0x12]
jbe 0x10040dd6
mov esi, eax
mov ecx, dword [eax]
cmp ecx, dword [eax + 8]
je 0x10040de3
mov eax, ecx
test eax, eax
jne 0x10040dc0
test esi, esi
je 0x10040e18
mov bl, byte [esi + 0xd]
push ecx
movzx edx, bl
lea ecx, [esp + 0x30]
call fcn.1000ac90
add esp, 4
mov byte [esi + 0xd], 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call ebp
mov ecx, dword [edi + 8]
inc bh
movzx eax, bh
sub ecx, eax
cmp ecx, 9
jge 0x10040db0
test bl, bl
jne 0x10040e53
mov ecx, dword [edi]
xor edx, edx
cmp ecx, edi
je 0x10040e44
test ecx, ecx
je 0x10040e44
jmp 0x10040e30
movzx eax, byte [ecx + 0xd]
bts edx, eax
mov eax, dword [ecx]
cmp eax, dword [ecx + 8]
je 0x10040e44
mov ecx, eax
test ecx, ecx
jne 0x10040e30
inc bl
mov eax, 1
mov cl, bl
shl eax, cl
test edx, eax
jne 0x10040e44
mov ebp, dword [esp + 0x18]
push ecx
movzx edx, bl
lea ecx, [esp + 0x30]
mov byte [ebp + 0xd], bl
call fcn.1000ac90
mov bl, byte [esp + 0x78]
add esp, 4
mov esi, dword [esp + 0x1c]
pop edi
jmp 0x10040eaf
mov bl, bh
test esi, esi
je 0x10040e18
mov eax, dword [edx + 4]
mov ecx, dword [edx]
push edx
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov dword [edx + 8], 0
dec dword [edi + 8]
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
jmp 0x10040e18
movzx edx, byte [ebp + 0xd]
push ecx
lea ecx, [esp + 0x2c]
call fcn.1000ac90
add esp, 4
push 0
push esi
lea edx, [ebp + 0xc]
lea ecx, [esp + 0x38]
call fcn.100081e0
add esp, 8
lea eax, [esp + 0x30]
push esi
push eax
push 3
push 0
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x10040ef3
test bl, bl
je 0x10040eef
mov ecx, dword [0x10059df0]
push 1
call fcn.10013690
mov bl, 1
jmp 0x10040ef5
xor bl, bl
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x10040f04
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x60
ret