Function at 0x404870
Capabilities:
Query or enumerate registry key
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e570
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x218
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 0x10], esp
xor ebx, ebx
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x11], bl
call edi
mov dword [ebp + 0x14], eax
mov esi, dword [ebp + 0x10]
mov byte [ebp - 4], 1
cmp esi, ebx
je 0x404dea
push esi
call fcn.00407d62
add esp, 4
test eax, eax
je 0x404de7
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x404dea
mov ebx, dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
call ebx
test eax, eax
je 0x404de7
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
lea ecx, [ebp + 0x14]
call fcn.004042a0
test eax, eax
jge 0x404908
mov ecx, dword [ebp + 0x14]
push ecx
jmp 0x404deb
mov edx, dword [ebp + 0xc]
push edx
call edi
mov dword [ebp - 0x18], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x404dd6
push eax
call ebx
test eax, eax
je 0x404dd3
push 0x41a588
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push 0x41a588
lea ecx, [ebp - 0x18]
call fcn.004042a0
test eax, eax
jl 0x404dd3
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
lea ecx, [ebp - 0x18]
call fcn.004042a0
test eax, eax
jge 0x404975
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call esi
mov ecx, dword [ebp + 0x14]
push ecx
call esi
jmp 0x404df1
mov edx, dword [ebp + 8]
push edx
call edi
mov esi, eax
mov dword [ebp + 0x10], esi
mov eax, dword [ebp + 0x14]
mov byte [ebp - 4], 3
test eax, eax
je 0x404db6
push eax
call ebx
cmp eax, 0xa
jb 0x404db6
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4049a6
xor edi, edi
jmp 0x4049ab
push eax
call ebx
mov edi, eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4049bd
push eax
call ebx
cmp edi, eax
jb 0x404db6
test esi, esi
je 0x404db6
push esi
call ebx
test eax, eax
je 0x404db6
mov eax, dword [ebp - 0x18]
push eax
push 1
call fcn.004034c0
add esp, 8
cmp eax, 5
mov dword [ebp - 0x1c], eax
jne 0x404a11
mov bl, byte [ebp + 0x1c]
test bl, bl
je 0x404a0b
mov ecx, dword [ebp - 0x18]
push esi
push ecx
push 1
call fcn.004039e0
mov edx, dword [ebp - 0x18]
add esp, 0xc
push esi
push edx
push 3
call fcn.004039e0
add esp, 0xc
mov byte [ebp - 0x11], 1
jmp 0x404a4e
cmp eax, 2
jne 0x404a4b
mov edi, dword [0x41e060]
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
inc edi
mov dword [0x41e060], edi
call esi
mov eax, dword [ebp - 0x18]
push eax
call esi
mov ecx, dword [ebp + 0x14]
push ecx
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov bl, byte [ebp + 0x1c]
mov edx, dword [ebp - 0x18]
push edx
push 2
call fcn.004034c0
add esp, 8
cmp eax, 5
jne 0x404a78
test bl, bl
je 0x404a74
mov eax, dword [ebp - 0x18]
push esi
push eax
push 2
call fcn.004039e0
add esp, 0xc
mov byte [ebp - 0x11], 1
mov ecx, dword [ebp - 0x18]
push ecx
push 3
call fcn.004034c0
add esp, 8
cmp eax, 5
jne 0x404aa2
test bl, bl
je 0x404a9e
mov edx, dword [ebp - 0x18]
push esi
push edx
push 3
call fcn.004039e0
add esp, 0xc
mov byte [ebp - 0x11], 1
mov ecx, dword [ebp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call edi
cmp eax, 5
mov dword [ebp - 0x1c], eax
jne 0x404b01
test bl, bl
mov byte [ebp - 0x11], 1
je 0x404cea
mov edx, dword [ebp - 0x18]
push esi
push edx
push 3
call fcn.004039e0
mov ecx, dword [ebp + 0x14]
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call edi
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x404cea
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x404cea
push 0x41a588
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
mov eax, dword [ebp + 0x14]
test eax, eax
mov dword [ebp + 0xc], ebx
jne 0x404b2f
xor edi, edi
jmp 0x404b38
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edi, eax
lea eax, [edi + ebx]
push eax
push 0
mov dword [ebp - 0x24], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x404c13
mov esi, dword [ebp + 0x14]
lea eax, [edi + edi]
mov ecx, eax
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xc]
mov esi, 0x41a588
add ecx, ecx
lea edi, [eax + ebx]
mov edx, ecx
mov eax, dword [ebp - 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebx + eax*2], 0
mov ecx, dword [ebp + 0x14]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp + 0x14], ebx
xor ebx, ebx
cmp ebx, 0x2710
jge 0x404c10
xor eax, eax
mov ecx, 0x80
push eax
lea edi, [ebp - 0x224]
push eax
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x20]
push eax
lea edx, [ebp + 0xc]
lea eax, [ebp - 0x224]
push edx
push eax
push ebx
push ecx
mov dword [ebp + 0xc], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
mov dword [ebp - 0x1c], eax
je 0x404c10
mov esi, eax
test esi, esi
jne 0x404c50
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
mov byte [ebp - 4], 4
je 0x404c09
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jne 0x404c22
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [ebp + 0x10]
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404d7d
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
push edx
push edi
push eax
push ecx
call fcn.00404870
add esp, 0x18
mov byte [ebp - 4], 3
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
inc ebx
jmp 0x404b9c
mov eax, dword [0x41e04c]
test eax, eax
je 0x404ce0
mov edx, dword [ebp + 0x14]
push edx
push str.Failed_to_enum_keys_from__ls
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
call fcn.0040762a
mov edi, str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [0x41e04c]
push 0
not ecx
dec ecx
push 0x41e048
push ecx
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x41e04c]
test eax, eax
je 0x404ce0
push esi
push str.__error___d_r_n
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
call fcn.0040762a
mov edi, str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push 0x41e048
push ecx
mov ecx, dword [0x41e04c]
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 0x11], 1
inc ebx
jmp 0x404b9c
mov eax, dword [0x41e04c]
test eax, eax
je 0x404d84
mov eax, dword [ebp + 0x14]
push eax
push str.Failed_to_open_key__ls
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
call fcn.0040762a
mov edi, str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
not ecx
dec ecx
push 0x41e048
push ecx
mov ecx, dword [0x41e04c]
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
push ecx
call ebx
mov eax, dword [0x41e04c]
test eax, eax
je 0x404d84
mov edx, dword [ebp - 0x1c]
push edx
push str.__error___d_r_n
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
call fcn.0040762a
mov edi, str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [0x41e04c]
push 0
not ecx
dec ecx
push 0x41e048
push ecx
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
push eax
call ebx
jmp 0x404d84
mov al, byte [ebp - 0x11]
test al, al
je 0x404d8d
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x404d8d
inc dword [eax]
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
mov ecx, dword [ebp - 0x18]
push ecx
call esi
mov edx, dword [ebp + 0x14]
push edx
call esi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
mov eax, dword [ebp - 0x18]
push eax
call esi
mov ecx, dword [ebp + 0x14]
push ecx
call esi
jmp 0x404df1
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call esi
mov edx, dword [ebp + 0x14]
push edx
call esi
jmp 0x404df1
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 0x80004005
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret