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

Disassembly:
push 0xffffffffffffffff
push 0x615c5d
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 0x40f6c0
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.0040f030
add esp, 0x10
test eax, eax
jne 0x40f6fc
mov dword [esp + 0x4f4], 0x35
mov edi, dword [esp + 0x4f4]
lea ecx, [esp + 0x28]
push ecx
push 0x20019
push ebx
push str.SoftwareMozillaFirefoxExtensions
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40f7d8
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 0x40f72d
push 0x35
call fcn.0040f660
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f72d
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 0x40f755
cmp dword [esp + 0x18], ebx
je 0x40f784
cmp dword [esp + 8], ebx
je 0x40f796
push 0x1b
call fcn.0040f660
add esp, 4
test eax, eax
je 0x40f796
mov dword [esp + 8], 1
cmp dword [esp + 0x4c], ebx
jne 0x40f765
cmp dword [esp + 0x50], ebx
je 0x40fb8b
cmp dword [esp + 0x18], ebx
jne 0x40f7af
cmp dword [esp + 0x2c], ebx
jne 0x40f7af
push 8
call fcn.0040f660
add esp, 4
mov dword [esp + 8], eax
jmp 0x40fb8b
push 0x1b
call fcn.0040f660
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f755
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 0x40f7cf
push 8
call fcn.0040f660
add esp, 4
mov dword [esp + 8], 1
test eax, eax
jne 0x40fb8b
mov dword [esp + 8], ebx
jmp 0x40fb8b
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 0x40f947
mov esi, dword [0x6d22e8]
cmp esi, ebx
jne 0x40f806
mov esi, 0x6d22ec
mov edx, 0x6a112c
test edx, edx
je 0x40fab3
cmp esi, ebx
je 0x40fab3
mov eax, str.idmmzcc3.xpi
test eax, eax
je 0x40fab3
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.00402e00
push esi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], 1
call fcn.0040e580
push str.idmmzcc3.xpi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 2
call fcn.0040e580
lea ecx, [esp + 0x14]
mov byte [esp + 0x4f4], 3
call fcn.00401070
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x44]
call fcn.00402400
push eax
call fcn.005e71bf
add esp, 4
lea ecx, [esp + 0x38]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e71bf
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005ffe3f
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x40f908
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.00402400
push eax
lea ecx, [esp + 0x3c]
call fcn.00402400
push eax
lea ecx, [esp + 0x2c]
call fcn.00402400
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005e714f
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e71bf
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 0x40fab3
cmp edi, 0x1a
jle 0x40fa91
mov esi, dword [0x6d22e8]
cmp esi, ebx
jne 0x40f95f
mov esi, 0x6d22ec
mov edx, 0x6a112c
test edx, edx
je 0x40fab3
cmp esi, ebx
je 0x40fab3
mov eax, str.idmmzcc2.xpi
test eax, eax
je 0x40fab3
push edx
lea ecx, [esp + 0x28]
call fcn.00402380
push esi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 4
call fcn.0040e580
mov bl, 5
push str.idmmzcc2.xpi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], bl
call fcn.0040e580
lea ecx, [esp + 0x14]
mov byte [esp + 0x4f4], 6
call fcn.00401070
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
call fcn.00402400
push eax
call fcn.005e71bf
add esp, 4
lea ecx, [esp + 0x44]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e71bf
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005ffe3f
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
je 0x40fa54
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.00402400
push eax
lea ecx, [esp + 0x48]
call fcn.00402400
push eax
lea ecx, [esp + 0x2c]
call fcn.00402400
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005e714f
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e71bf
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 0x40fab3
mov eax, dword [0x6d2310]
cmp eax, ebx
jne 0x40fa9f
mov eax, 0x6d2314
push str.idmmzcc5
push eax
push 0x6a112c
lea ecx, [esp + 0x20]
call fcn.0040fbb0
pop esi
cmp edi, 0x1a
mov dword [esp + 0x4c], 0x410
pop ebp
mov eax, 0x6a1e14
jg 0x40facc
mov eax, 0x6a1dc4
lea edx, [esp + 0x54]
push eax
push edx
call fcn.005e7389
lea eax, [esp + 0x5c]
push eax
call fcn.005e71bf
add esp, 0xc
cmp eax, ebx
jle 0x40fb03
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 0x40faec
cmp edi, 0x34
jle 0x40fb20
lea eax, [esp + 0x54]
push 0x32
push eax
call fcn.005e77bb
add esp, 8
cmp eax, ebx
je 0x40fb20
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 0x40fb77
mov eax, dword [esp + 0xc]
cmp eax, ebx
jne 0x40fb4f
lea eax, [esp + 0x10]
lea edx, [esp + 0xd4]
push eax
push edx
call fcn.005e985c
add esp, 8
test eax, eax
jne 0x40fb6c
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