Function at 0x40f100
Capabilities:
Encode data using xor
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x60c7bd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4dc
push ebx
push edi
mov edi, dword [esp + 0x4f4]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 8], ebx
jne 0x40f160
lea eax, [esp + 0x18]
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x54]
push ecx
lea eax, [esp + 0x54]
push edx
push eax
call fcn.0040ead0
add esp, 0x10
test eax, eax
jne 0x40f19c
mov dword [esp + 0x4f4], 0x35
mov edi, dword [esp + 0x4f4]
lea ecx, [esp + 0x28]
push ecx
push 0x20019
push ebx
push 0x6bd14c
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40f278
pop edi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4dc]
mov dword fs:[0], ecx
add esp, 0x4e8
ret
cmp dword [esp + 0x18], ebx
je 0x40f1cd
push 0x35
call fcn.0040f100
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f1cd
pop edi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4dc]
mov dword fs:[0], ecx
add esp, 0x4e8
ret
cmp dword [esp + 0x2c], ebx
je 0x40f1f5
cmp dword [esp + 0x18], ebx
je 0x40f224
cmp dword [esp + 8], ebx
je 0x40f236
push 0x1b
call fcn.0040f100
add esp, 4
test eax, eax
je 0x40f236
mov dword [esp + 8], 1
cmp dword [esp + 0x4c], ebx
jne 0x40f205
cmp dword [esp + 0x50], ebx
je 0x40f62b
cmp dword [esp + 0x18], ebx
jne 0x40f24f
cmp dword [esp + 0x2c], ebx
jne 0x40f24f
push 8
call fcn.0040f100
add esp, 4
mov dword [esp + 8], eax
jmp 0x40f62b
push 0x1b
call fcn.0040f100
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f1f5
pop edi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4dc]
mov dword fs:[0], ecx
add esp, 0x4e8
ret
cmp dword [esp + 8], ebx
je 0x40f26f
push 8
call fcn.0040f100
add esp, 4
mov dword [esp + 8], 1
test eax, eax
jne 0x40f62b
mov dword [esp + 8], ebx
jmp 0x40f62b
push ebp
push esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
mov word [esp + 0x18], bx
cmp edi, 0x34
mov dword [esp + 0x4f4], ebx
jle 0x40f3e7
mov esi, dword [0x6ec738]
cmp esi, ebx
jne 0x40f2a6
mov esi, 0x6ec73c
mov edx, 0x6bc11c
test edx, edx
je 0x40f553
cmp esi, ebx
je 0x40f553
mov eax, 0x6bd130
test eax, eax
je 0x40f553
push ebx
push edx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
mov word [esp + 0x30], bx
call fcn.00402d00
push esi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], 1
call fcn.0040e020
push 0x6bd130
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 2
call fcn.0040e020
lea ecx, [esp + 0x14]
mov byte [esp + 0x4f4], 3
call fcn.00401070
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x44]
call fcn.004023d0
push eax
call fcn.005de123
add esp, 4
lea ecx, [esp + 0x38]
mov edi, eax
call fcn.004023d0
push eax
call fcn.005de123
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005f6c5c
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x40f3a8
mov ecx, ebp
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [esp + 0x44]
call fcn.004023d0
push eax
lea ecx, [esp + 0x3c]
call fcn.004023d0
push eax
lea ecx, [esp + 0x2c]
call fcn.004023d0
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005de0b3
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005de123
add esp, 0x18
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x4f4], 2
call fcn.00401070
lea ecx, [esp + 0x38]
mov byte [esp + 0x4f4], 1
call fcn.00401070
lea ecx, [esp + 0x24]
mov byte [esp + 0x4f4], 0
call fcn.00401070
mov edi, dword [esp + 0x4fc]
jmp 0x40f553
cmp edi, 0x1a
jle 0x40f531
mov esi, dword [0x6ec738]
cmp esi, ebx
jne 0x40f3ff
mov esi, 0x6ec73c
mov edx, 0x6bc11c
test edx, edx
je 0x40f553
cmp esi, ebx
je 0x40f553
mov eax, 0x6bd114
test eax, eax
je 0x40f553
push edx
lea ecx, [esp + 0x28]
call fcn.00402350
push esi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 4
call fcn.0040e020
mov bl, 5
push 0x6bd114
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], bl
call fcn.0040e020
lea ecx, [esp + 0x14]
mov byte [esp + 0x4f4], 6
call fcn.00401070
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
call fcn.004023d0
push eax
call fcn.005de123
add esp, 4
lea ecx, [esp + 0x44]
mov edi, eax
call fcn.004023d0
push eax
call fcn.005de123
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005f6c5c
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
je 0x40f4f4
mov ecx, ebp
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [esp + 0x38]
call fcn.004023d0
push eax
lea ecx, [esp + 0x48]
call fcn.004023d0
push eax
lea ecx, [esp + 0x2c]
call fcn.004023d0
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005de0b3
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005de123
add esp, 0x18
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x4f4], bl
call fcn.00401070
lea ecx, [esp + 0x44]
mov byte [esp + 0x4f4], 4
call fcn.00401070
lea ecx, [esp + 0x24]
mov byte [esp + 0x4f4], 0
call fcn.00401070
mov edi, dword [esp + 0x4fc]
xor ebx, ebx
jmp 0x40f553
mov eax, dword [0x6ec760]
cmp eax, ebx
jne 0x40f53f
mov eax, 0x6ec764
push 0x6bd100
push eax
push 0x6bc11c
lea ecx, [esp + 0x20]
call fcn.0040f650
pop esi
cmp edi, 0x1a
mov dword [esp + 0x4c], 0x410
pop ebp
mov eax, 0x6bce14
jg 0x40f56c
mov eax, 0x6bcdc4
lea edx, [esp + 0x54]
push eax
push edx
call fcn.005de2e9
lea eax, [esp + 0x5c]
push eax
call fcn.005de123
add esp, 0xc
cmp eax, ebx
jle 0x40f5a3
lea ecx, [esp + 0x54]
mov dx, word [ecx]
add ecx, 2
xor dx, 0x4d
sub edx, 0xff
dec eax
mov word [ecx - 2], dx
jne 0x40f58c
cmp edi, 0x34
jle 0x40f5c0
lea eax, [esp + 0x54]
push 0x32
push eax
call fcn.005de61b
add esp, 8
cmp eax, ebx
je 0x40f5c0
mov word [eax], 0x33
lea ecx, [esp + 0x48]
lea edx, [esp + 0xd4]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push ebx
lea eax, [esp + 0x60]
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f617
mov eax, dword [esp + 0xc]
cmp eax, ebx
jne 0x40f5ef
lea eax, [esp + 0x10]
lea edx, [esp + 0xd4]
push eax
push edx
call fcn.005e07bc
add esp, 8
test eax, eax
jne 0x40f60c
mov dword [esp + 8], 1
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xc]
mov dword [esp + 0x4ec], 0xffffffff
call fcn.00401070
mov ecx, dword [esp + 0x4e4]
mov eax, dword [esp + 8]
pop edi
pop ebx
mov dword fs:[0], ecx
add esp, 0x4e8
ret