Function at 0x516f40
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x36
push 0
push 0
dec ecx
jne 0x516f49
xchg dword [ebp - 4], ecx
push ebx
push esi
mov byte [ebp - 0x175], cl
mov dword [ebp - 4], edx
mov dword [ebp - 0x174], eax
mov eax, dword [ebp - 4]
call fcn.00405bbc
lea eax, [ebp - 0x170]
mov edx, dword [0x4095f4]
call fcn.00406514
xor eax, eax
push ebp
push 0x5174e7
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x17c], 0xffffffff
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
cmp dword [ebp - 0x174], 0
je 0x5174ab
lea edx, [ebp - 0x194]
mov eax, dword [ebp - 4]
call fcn.0040a760
mov edx, dword [ebp - 0x194]
lea eax, [ebp - 4]
call fcn.004057d4
mov eax, dword [ebp - 0x174]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5174a1
inc eax
mov dword [ebp - 0x190], eax
mov dword [ebp - 0x180], 0
lea ecx, [ebp - 0x19c]
mov edx, dword [ebp - 0x180]
mov eax, dword [ebp - 0x174]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x19c]
lea edx, [ebp - 0x198]
call fcn.0040a760
mov eax, dword [ebp - 0x198]
mov edx, dword [ebp - 4]
call fcn.00405b64
jne 0x51748f
mov eax, dword [ebp - 0x180]
mov dword [ebp - 0x17c], eax
cmp byte [0x5608bc], 0
je 0x51723d
mov edx, dword [ebp - 0x180]
mov eax, dword [ebp - 0x174]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [ebp - 0x184], eax
xor eax, eax
mov dword [ebp - 0x18c], eax
xor eax, eax
push ebp
push 0x5171f6
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x42c3b0]
call fcn.0042c51c
mov dword [ebp - 0x18c], eax
cmp dword [ebp - 0x184], 0
jne 0x5170a6
mov edx, 0x80000001
mov eax, dword [ebp - 0x18c]
call fcn.0042c5f8
lea eax, [ebp - 0xc]
mov edx, 0x517504
call fcn.004057d4
jmp 0x5170c3
mov edx, 0x80000002
mov eax, dword [ebp - 0x18c]
call fcn.0042c5f8
lea eax, [ebp - 0xc]
mov edx, 0x517518
call fcn.004057d4
xor ecx, ecx
mov edx, 0x517530
mov eax, dword [ebp - 0x18c]
call fcn.0042c660
test al, al
je 0x5171dd
lea eax, [ebp - 8]
call fcn.0040573c
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18c]
call fcn.0042cef8
test al, al
je 0x517108
lea ecx, [ebp - 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18c]
call fcn.0042ccfc
cmp dword [ebp - 8], 0
je 0x5171d2
lea ecx, [ebp - 0x1a4]
mov edx, dword [ebp - 0x180]
mov eax, dword [ebp - 0x174]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x1a4]
lea ecx, [ebp - 0x1a0]
mov eax, dword [ebp - 8]
call fcn.004fe830
mov edx, dword [ebp - 0x1a0]
lea eax, [ebp - 8]
call fcn.004057d4
lea ecx, [ebp - 0x1a8]
mov edx, 0x51757c
mov eax, dword [ebp - 8]
call fcn.004fe830
mov edx, dword [ebp - 0x1a8]
lea eax, [ebp - 8]
call fcn.004057d4
lea ecx, [ebp - 0x170]
mov edx, 0x3f
mov eax, dword [ebp - 8]
call fcn.0040b608
mov ebx, eax
xor eax, eax
push ebp
push 0x5171cb
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jne 0x5171b2
test byte [ebp - 0x160], 0x18
jne 0x5171a1
mov eax, dword [ebp + 8]
inc dword [eax]
lea eax, [ebp - 0x170]
call fcn.0040b658
mov ebx, eax
test ebx, ebx
je 0x517193
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5171d2
lea eax, [ebp - 0x170]
call fcn.0040b67c
ret
mov eax, dword [ebp - 0x18c]
call fcn.0042c5c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5171fd
mov eax, dword [ebp - 0x18c]
call fcn.004047e0
ret
lea ecx, [ebp - 0x1ac]
mov edx, dword [ebp - 0x180]
mov eax, dword [ebp - 0x174]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x1ac]
mov eax, dword [0x5608b4]
call fcn.0051537c
mov dword [ebp - 0x188], eax
cmp dword [ebp - 0x188], 0
je 0x51748f
xor edx, edx
push ebp
push 0x517488
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x188]
call fcn.00405934
mov eax, dword [ebp - 8]
test eax, eax
je 0x51729f
sub eax, 4
mov eax, dword [eax]
dec eax
jge 0x5172ac
call fcn.00405140
jmp 0x5174ab
lea eax, [ebp - 8]
call fcn.00405c2c
mov byte [eax], 0x41
mov edx, dword [ebp - 8]
mov eax, 0x517588
call fcn.00405d18
mov ebx, eax
lea eax, [ebp - 8]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405c34
mov edx, dword [ebp - 8]
mov eax, 0x517594
call fcn.00405d18
mov ebx, eax
test ebx, ebx
jne 0x5172f7
call fcn.00405140
jmp 0x5174ab
mov esi, dword [ebp - 8]
test esi, esi
je 0x517303
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 8]
push eax
mov ecx, esi
mov edx, ebx
mov eax, dword [ebp - 8]
call fcn.00405c34
mov dword [ebp - 0x184], 2
mov edx, dword [ebp - 8]
mov eax, 0x5175a0
call fcn.00405d18
mov ebx, eax
test ebx, ebx
jne 0x51733a
call fcn.00405140
jmp 0x5174ab
mov esi, dword [ebp - 8]
test esi, esi
je 0x517346
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 8]
push eax
lea edx, [ebx + 1]
mov ecx, esi
mov eax, dword [ebp - 8]
call fcn.00405c34
dec dword [ebp - 0x184]
jne 0x51731d
mov edx, dword [ebp - 8]
mov eax, 0x5175a0
call fcn.00405d18
mov ebx, eax
test ebx, ebx
jne 0x51737c
call fcn.00405140
jmp 0x5174ab
lea eax, [ebp - 0x1b4]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405c34
mov eax, dword [ebp - 0x1b4]
lea edx, [ebp - 0x1b0]
call fcn.0040aa44
mov eax, dword [ebp - 0x1b0]
xor edx, edx
call fcn.0040b16c
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov esi, dword [ebp - 8]
test esi, esi
je 0x5173c2
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 8]
push eax
lea edx, [ebx + 1]
mov ecx, esi
mov eax, dword [ebp - 8]
call fcn.00405c34
mov edx, dword [ebp - 8]
mov eax, 0x5175a0
call fcn.00405d18
mov ebx, eax
test ebx, ebx
jne 0x5173f0
call fcn.00405140
jmp 0x5174ab
mov esi, dword [ebp - 8]
test esi, esi
je 0x5173fc
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 8]
push eax
lea edx, [ebx + 1]
mov ecx, esi
mov eax, dword [ebp - 8]
call fcn.00405c34
mov edx, dword [ebp - 8]
mov eax, 0x5175a0
call fcn.00405d18
mov ebx, eax
test ebx, ebx
jne 0x51742f
mov eax, dword [ebp - 8]
test eax, eax
je 0x51742c
sub eax, 4
mov eax, dword [eax]
lea ebx, [eax + 1]
lea eax, [ebp - 8]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405c34
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.0040b16c
mov ebx, eax
movzx eax, byte [ebp - 0x175]
call fcn.00516f30
cmp ebx, eax
je 0x517468
call fcn.004fd964
sub al, 2
jae 0x51746f
call fcn.00405140
jmp 0x5174ab
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51748f
mov eax, dword [ebp - 0x188]
call fcn.0040bd2c
ret
inc dword [ebp - 0x180]
dec dword [ebp - 0x190]
jne 0x516fea
mov dword [ebp - 0x17c], 0xfffffffe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5174ee
lea eax, [ebp - 0x1b4]
mov edx, 9
call fcn.00405760
lea eax, [ebp - 0x170]
mov edx, dword [0x4095f4]
call fcn.004065e4
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00405760
ret