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

Disassembly:
push 0xffffffffffffffff
push 0x614cfd
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 0x40f6e0
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.0040f050
add esp, 0x10
test eax, eax
jne 0x40f71c
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 0x40f7f8
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 0x40f74d
push 0x35
call fcn.0040f680
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f74d
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 0x40f775
cmp dword [esp + 0x18], ebx
je 0x40f7a4
cmp dword [esp + 8], ebx
je 0x40f7b6
push 0x1b
call fcn.0040f680
add esp, 4
test eax, eax
je 0x40f7b6
mov dword [esp + 8], 1
cmp dword [esp + 0x4c], ebx
jne 0x40f785
cmp dword [esp + 0x50], ebx
je 0x40fbab
cmp dword [esp + 0x18], ebx
jne 0x40f7cf
cmp dword [esp + 0x2c], ebx
jne 0x40f7cf
push 8
call fcn.0040f680
add esp, 4
mov dword [esp + 8], eax
jmp 0x40fbab
push 0x1b
call fcn.0040f680
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f775
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 0x40f7ef
push 8
call fcn.0040f680
add esp, 4
mov dword [esp + 8], 1
test eax, eax
jne 0x40fbab
mov dword [esp + 8], ebx
jmp 0x40fbab
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 0x40f967
mov esi, dword [0x6d1288]
cmp esi, ebx
jne 0x40f826
mov esi, 0x6d128c
mov edx, 0x6a012c
test edx, edx
je 0x40fad3
cmp esi, ebx
je 0x40fad3
mov eax, str.idmmzcc3.xpi
test eax, eax
je 0x40fad3
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.0040e5a0
push str.idmmzcc3.xpi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 2
call fcn.0040e5a0
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.005e639f
add esp, 4
lea ecx, [esp + 0x38]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e639f
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005feedc
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x40f928
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.005e632f
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e639f
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 0x40fad3
cmp edi, 0x1a
jle 0x40fab1
mov esi, dword [0x6d1288]
cmp esi, ebx
jne 0x40f97f
mov esi, 0x6d128c
mov edx, 0x6a012c
test edx, edx
je 0x40fad3
cmp esi, ebx
je 0x40fad3
mov eax, str.idmmzcc2.xpi
test eax, eax
je 0x40fad3
push edx
lea ecx, [esp + 0x28]
call fcn.00402380
push esi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 4
call fcn.0040e5a0
mov bl, 5
push str.idmmzcc2.xpi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], bl
call fcn.0040e5a0
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.005e639f
add esp, 4
lea ecx, [esp + 0x44]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e639f
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005feedc
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
je 0x40fa74
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.005e632f
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e639f
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 0x40fad3
mov eax, dword [0x6d12b0]
cmp eax, ebx
jne 0x40fabf
mov eax, 0x6d12b4
push str.idmmzcc5
push eax
push 0x6a012c
lea ecx, [esp + 0x20]
call fcn.0040fbd0
pop esi
cmp edi, 0x1a
mov dword [esp + 0x4c], 0x410
pop ebp
mov eax, 0x6a0e14
jg 0x40faec
mov eax, 0x6a0dc4
lea edx, [esp + 0x54]
push eax
push edx
call fcn.005e6569
lea eax, [esp + 0x5c]
push eax
call fcn.005e639f
add esp, 0xc
cmp eax, ebx
jle 0x40fb23
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 0x40fb0c
cmp edi, 0x34
jle 0x40fb40
lea eax, [esp + 0x54]
push 0x32
push eax
call fcn.005e699b
add esp, 8
cmp eax, ebx
je 0x40fb40
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 0x40fb97
mov eax, dword [esp + 0xc]
cmp eax, ebx
jne 0x40fb6f
lea eax, [esp + 0x10]
lea edx, [esp + 0xd4]
push eax
push edx
call fcn.005e8a3c
add esp, 8
test eax, eax
jne 0x40fb8c
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