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

Disassembly:
push 0xffffffffffffffff
push 0x6139dd
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 0x40f6f0
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.0040f060
add esp, 0x10
test eax, eax
jne 0x40f72c
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 0x40f808
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 0x40f75d
push 0x35
call fcn.0040f690
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f75d
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 0x40f785
cmp dword [esp + 0x18], ebx
je 0x40f7b4
cmp dword [esp + 8], ebx
je 0x40f7c6
push 0x1b
call fcn.0040f690
add esp, 4
test eax, eax
je 0x40f7c6
mov dword [esp + 8], 1
cmp dword [esp + 0x4c], ebx
jne 0x40f795
cmp dword [esp + 0x50], ebx
je 0x40fbbb
cmp dword [esp + 0x18], ebx
jne 0x40f7df
cmp dword [esp + 0x2c], ebx
jne 0x40f7df
push 8
call fcn.0040f690
add esp, 4
mov dword [esp + 8], eax
jmp 0x40fbbb
push 0x1b
call fcn.0040f690
add esp, 4
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x40f785
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 0x40f7ff
push 8
call fcn.0040f690
add esp, 4
mov dword [esp + 8], 1
test eax, eax
jne 0x40fbbb
mov dword [esp + 8], ebx
jmp 0x40fbbb
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 0x40f977
mov esi, dword [0x6f62f8]
cmp esi, ebx
jne 0x40f836
mov esi, 0x6f62fc
mov edx, 0x6c5124
test edx, edx
je 0x40fae3
cmp esi, ebx
je 0x40fae3
mov eax, str.idmmzcc3.xpi
test eax, eax
je 0x40fae3
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.00402ce0
push esi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], 1
call fcn.0040e5b0
push str.idmmzcc3.xpi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 2
call fcn.0040e5b0
lea ecx, [esp + 0x14]
mov byte [esp + 0x4f4], 3
call fcn.00401070
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x44]
call fcn.004023b0
push eax
call fcn.005e519b
add esp, 4
lea ecx, [esp + 0x38]
mov edi, eax
call fcn.004023b0
push eax
call fcn.005e519b
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005fdccd
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x40f938
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.004023b0
push eax
lea ecx, [esp + 0x3c]
call fcn.004023b0
push eax
lea ecx, [esp + 0x2c]
call fcn.004023b0
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005e512b
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e519b
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 0x40fae3
cmp edi, 0x1a
jle 0x40fac1
mov esi, dword [0x6f62f8]
cmp esi, ebx
jne 0x40f98f
mov esi, 0x6f62fc
mov edx, 0x6c5124
test edx, edx
je 0x40fae3
cmp esi, ebx
je 0x40fae3
mov eax, str.idmmzcc2.xpi
test eax, eax
je 0x40fae3
push edx
lea ecx, [esp + 0x28]
call fcn.00402330
push esi
lea ecx, [esp + 0x48]
mov byte [esp + 0x4f8], 4
call fcn.0040e5b0
mov bl, 5
push str.idmmzcc2.xpi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4f8], bl
call fcn.0040e5b0
lea ecx, [esp + 0x14]
mov byte [esp + 0x4f4], 6
call fcn.00401070
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
call fcn.004023b0
push eax
call fcn.005e519b
add esp, 4
lea ecx, [esp + 0x44]
mov edi, eax
call fcn.004023b0
push eax
call fcn.005e519b
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005fdccd
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
je 0x40fa84
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.004023b0
push eax
lea ecx, [esp + 0x48]
call fcn.004023b0
push eax
lea ecx, [esp + 0x2c]
call fcn.004023b0
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005e512b
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e519b
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 0x40fae3
mov eax, dword [0x6f6320]
cmp eax, ebx
jne 0x40facf
mov eax, 0x6f6324
push str.idmmzcc5
push eax
push 0x6c5124
lea ecx, [esp + 0x20]
call fcn.0040fbe0
pop esi
cmp edi, 0x1a
mov dword [esp + 0x4c], 0x410
pop ebp
mov eax, 0x6c5e0c
jg 0x40fafc
mov eax, 0x6c5dbc
lea edx, [esp + 0x54]
push eax
push edx
call fcn.005e5369
lea eax, [esp + 0x5c]
push eax
call fcn.005e519b
add esp, 0xc
cmp eax, ebx
jle 0x40fb33
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 0x40fb1c
cmp edi, 0x34
jle 0x40fb50
lea eax, [esp + 0x54]
push 0x32
push eax
call fcn.005e569b
add esp, 8
cmp eax, ebx
je 0x40fb50
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 0x40fba7
mov eax, dword [esp + 0xc]
cmp eax, ebx
jne 0x40fb7f
lea eax, [esp + 0x10]
lea edx, [esp + 0xd4]
push eax
push edx
call fcn.005e783c
add esp, 8
test eax, eax
jne 0x40fb9c
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