Function at 0x10013820
Capabilities:
Set registry value

Disassembly:
sub esp, 0xfdc
push ebx
mov ebx, dword [esp + 0xfe8]
mov edx, ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x24], 0
push edi
push 0
lea ecx, [esp + 0x38]
mov dword [esp + 0x34], esi
mov dword [esp + 0x18], 0
call fcn.1000a3a0
add esp, 4
mov word [esp + 0x24], 0x1ff
mov ebp, dword [eax + 4]
mov ecx, dword [eax]
mov eax, dword [ebx]
lea eax, [eax + ecx*2]
mov dword [esp + 0x44], eax
test ebp, ebp
jle 0x100138b6
lea ebx, [ebp*2]
lea eax, [ebx + 0x20]
mov dword [esp + 0x20], eax
add eax, 4
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x10013894
add edi, 4
mov dword [esp + 0x18], edi
test edi, edi
je 0x100138b6
push ebx
push dword [esp + 0x48]
xor eax, eax
mov dword [esp + 0x24], ebp
push edi
mov word [ebx + edi], ax
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x100138cd
mov edi, 0x10059da0
mov dword [esp + 0x20], 0
xor ebp, ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebp
mov bl, 1
test ebp, ebp
je 0x10013bb5
push ecx
lea edx, [esi + 0x1260]
lea ecx, [esp + 0x1c]
call fcn.1000a6a0
add esp, 4
test al, al
je 0x100138f3
jmp 0x10013bb7
push ecx
lea edx, [esi + 0x1270]
lea ecx, [esp + 0x1c]
call fcn.1000a6a0
add esp, 4
test al, al
jne 0x10013bb5
push ecx
lea edx, [esi + 0x1280]
lea ecx, [esp + 0x1c]
call fcn.1000a6a0
add esp, 4
test al, al
jne 0x10013bb5
push ecx
lea edx, [esi + 0x12b0]
lea ecx, [esp + 0x1c]
call fcn.1000a6a0
mov bh, al
add esp, 4
test bh, bh
jne 0x1001394e
cmp byte [esi + 0x1172], al
je 0x10013bb5
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [esp + 0x28]
push 0
push eax
push 0
push 4
push 0
push 0
push 0
push str.SoftwareDownloadManagerIDMBI
push reloc.WS2_32.dll_accept
call esi
test eax, eax
jne 0x10013bb5
push eax
lea eax, [esp + 0x18]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push edi
push dword [esp + 0x48]
call esi
test eax, eax
jne 0x10013bb5
mov edx, dword [esp + 0xff4]
lea ecx, [esp + 0x34]
call fcn.100062c0
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x10013a02
test ebp, ebp
jle 0x100139f5
lea ecx, [ebp*2]
lea eax, [ecx + 2]
cmp dword [esp + 0x3c], eax
jae 0x100139dc
push eax
lea ecx, [esp + 0x38]
call fcn.10004970
test eax, eax
je 0x100139f5
lea ecx, [ebp*2]
mov esi, dword [esp + 0x34]
xor eax, eax
push ecx
push edi
push esi
mov word [ecx + esi], ax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, ebp
jmp 0x10013a06
mov esi, dword [esp + 0x34]
xor eax, eax
xor ecx, ecx
mov word [esi], cx
jmp 0x10013a06
mov esi, dword [esp + 0x34]
lea eax, [eax*2 + 2]
push eax
push esi
push 1
push 0
push 0x10054104
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test bh, bh
jne 0x10013ad7
mov ecx, dword [esp + 0xff0]
cmp dword [ecx + 0xc], 0
je 0x10013a3c
add ecx, 8
jmp 0x10013a47
mov eax, dword [ecx + 4]
add ecx, 0x44
mov eax, dword [eax + 8]
add ecx, eax
movzx eax, byte [ecx + 0xc]
push ecx
push eax
push dword [ecx + 4]
mov dword [esp + 0x24], 0x10059da0
push dword [ecx]
lea ecx, [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov word [esp + 0x34], 0xff
call fcn.100049d0
mov ecx, 0x4000002
call fcn.10005270
push esi
push dword [esp + 0x1c]
push edi
push esi
push eax
lea eax, [esp + 0x5c]
push 0x7d0
push eax
call fcn.1000ee20
add esp, 0x1c
lea eax, [esp + 0x48]
push 0x50024
push 0x10054110
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
sete bl
cmp eax, 0x10059da0
je 0x10013ad7
add eax, 0xfffffffc
push eax
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
push 4
movzx eax, bl
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
push eax
push 4
push 0
push 0x10054144
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx esi, bl
xor esi, 1
add esi, 0x126
shl esi, 4
add esi, dword [esp + 0x30]
mov eax, dword [esi + 4]
test eax, eax
je 0x10013b47
lea eax, [eax*2 + 4]
cmp dword [esi + 8], eax
jae 0x10013b2a
push eax
mov ecx, esi
call fcn.10004970
test eax, eax
je 0x10013b47
mov ecx, dword [esi + 4]
mov edx, 0x7c
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov ecx, dword [esi + 4]
mov eax, dword [esi]
inc ecx
xor edx, edx
mov dword [esi + 4], ecx
mov word [eax + ecx*2], dx
test ebp, ebp
jle 0x10013b8e
mov eax, dword [esi + 4]
add eax, ebp
lea eax, [eax*2 + 2]
cmp dword [esi + 8], eax
jae 0x10013b68
push eax
mov ecx, esi
call fcn.10004970
test eax, eax
je 0x10013b8e
mov ecx, dword [esi + 4]
mov eax, dword [esi]
lea edx, [eax + ecx*2]
lea eax, [ecx + ebp]
xor ecx, ecx
mov dword [esi + 4], eax
lea eax, [ebp*2]
push eax
push edi
push edx
mov word [eax + edx], cx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 0x30]
push 1
call fcn.10013690
mov eax, dword [esp + 0x34]
mov ebp, dword [sym.imp.msvcrt.dll_free]
cmp eax, 0x10059da0
je 0x10013bbd
add eax, 0xfffffffc
push eax
call ebp
add esp, 4
jmp 0x10013bbd
xor bl, bl
mov ebp, dword [sym.imp.msvcrt.dll_free]
cmp edi, 0x10059da0
je 0x10013bce
lea eax, [edi - 4]
push eax
call ebp
add esp, 4
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x10013bdf
push eax
call esi
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x10013bea
push ecx
call esi
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0xfdc
ret 8