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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e5e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x460
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
cmp ebx, esi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], esi
je 0x406216
mov edi, dword [ebp + 0xc]
cmp edi, esi
je 0x406216
push edi
call fcn.00407d62
add esp, 4
test eax, eax
je 0x406216
mov al, byte [ebp + 0x1c]
test al, al
mov eax, dword [ebp + 0x10]
je 0x405644
cmp eax, esi
jne 0x406216
jmp 0x40565d
cmp eax, esi
je 0x406216
push eax
call fcn.00407d62
add esp, 4
test eax, eax
je 0x406216
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], esi
push eax
push 0x20019
push esi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
cmp ebx, esi
mov dword [ebp - 0x18], ebx
jne 0x4061cf
cmp dword [ebp - 0x38], esi
je 0x40622c
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 0x1c], eax
cmp eax, esi
mov byte [ebp - 4], 1
je 0x4056a8
mov edi, dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
call edi
cmp eax, 2
jae 0x4056c1
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x406216
mov ecx, dword [ebp - 0x1c]
cmp ecx, esi
jne 0x4056cc
xor eax, eax
jmp 0x4056d2
push ecx
call edi
mov ecx, dword [ebp - 0x1c]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x4056f3
push 0x41a588
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push 0x41a588
lea ecx, [ebp - 0x1c]
call fcn.004042a0
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x50], eax
test ebx, ebx
jne 0x405c9c
cmp dword [ebp - 0x50], 0x3e8
jge 0x405c9c
xor eax, eax
mov edx, dword [ebp - 0x14]
push eax
mov ecx, 0x82
lea edi, [ebp - 0x26c]
push eax
push eax
push eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x26c]
push eax
mov eax, dword [ebp - 0x38]
push ecx
push edx
push eax
mov dword [ebp - 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x4061b9
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4061b9
cmp eax, 0xff
jae 0x4061b9
lea ecx, [ebp - 0x26c]
push ecx
call fcn.00407d62
add esp, 4
test eax, eax
je 0x4061b9
mov al, byte [ebp + 0x1c]
test al, al
jne 0x4058e1
lea edx, [ebp - 0x26c]
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov edi, eax
test edi, edi
je 0x4057b8
push edi
call dword [sym.imp.USER32.dll_CharUpperW]
test eax, eax
je 0x4057b8
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push edi
mov ebx, eax
call esi
mov edi, ebx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x405866
push eax
call fcn.00407d62
add esp, 4
test eax, eax
je 0x405866
test edi, edi
jne 0x4057dc
xor ebx, ebx
jmp 0x4057e5
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov ebx, eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00407d62
add esp, 4
cmp ebx, eax
jb 0x405866
mov edx, dword [ebp + 0x10]
push edx
push edi
call fcn.00407db7
add esp, 8
test eax, eax
je 0x405866
push str.VID_0421PID_010
push edi
call fcn.00407db7
add esp, 8
test eax, eax
je 0x405860
push str.VID_0421PID_0103
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x40587f
push str.VID_0421PID_0104
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x40587f
push str.VID_0421PID_0105
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x40587f
push str.VID_0421PID_0106
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x40587f
cmp byte [ebp + 0x20], 1
jne 0x405886
mov ecx, dword [ebp - 0x14]
push edi
inc ecx
mov dword [ebp - 0x14], ecx
call esi
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
mov al, byte [ebp + 0x20]
test al, al
jmp 0x405864
push edi
call esi
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x405cf6
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x405c9c
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov ecx, dword [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, eax
mov dword [ebp + 0xc], edi
mov dword [ebp - 0x34], edi
lea edx, [ebp - 0x26c]
mov byte [ebp - 4], 4
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test edi, edi
mov dword [ebp - 0x30], ebx
jne 0x405bfb
xor esi, esi
jmp 0x405c04
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x405c9c
push eax
call fcn.00407d62
add esp, 4
test eax, eax
je 0x405c9c
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x405c9c
push eax
call fcn.00407d62
add esp, 4
test eax, eax
je 0x405c9c
mov eax, dword [ebp - 0x1c]
mov ebx, dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
call ebx
mov ecx, dword [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0x26c]
mov byte [ebp - 4], 2
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x24]
call fcn.004042a0
mov ecx, dword [ebp - 0x24]
test ecx, ecx
jne 0x40595f
xor edi, edi
jmp 0x405967
push ecx
call ebx
mov ecx, dword [ebp - 0x24]
mov edi, eax
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x405974
push eax
call ebx
mov ecx, dword [ebp - 0x24]
cmp edi, eax
ja 0x405987
push ecx
mov dword [ebp - 0x18], 0x80004005
call esi
jmp 0x405c9c
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x48]
xor ebx, ebx
push edx
push 0x20019
push ebx
push ecx
push eax
mov dword [ebp - 0x48], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405be9
mov edx, dword [ebp - 0x48]
cmp edx, ebx
je 0x405be9
mov ecx, 0x3f
lea edi, [ebp - 0x36b]
mov byte [ebp - 0x36c], al
mov dword [ebp - 0x58], 0xff
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x60], ebx
stosw word es:[edi], ax
push ecx
lea eax, [ebp - 0x36c]
lea ecx, [ebp - 0x60]
push eax
mov eax, dword [ebp + 0x14]
push ecx
push ebx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 0x48]
mov edi, eax
push ecx
mov dword [ebp - 0x18], edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
jne 0x405ba8
cmp dword [ebp - 0x58], 1
jb 0x405bc9
mov eax, dword [ebp - 0x60]
cmp eax, 1
je 0x405a20
cmp eax, 2
jne 0x405bc9
lea edx, [ebp - 0x36c]
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov edi, eax
mov dword [ebp + 0xc], edi
cmp edi, ebx
mov byte [ebp - 4], 3
je 0x405a56
push edi
call dword [sym.imp.USER32.dll_CharUpperW]
cmp eax, ebx
je 0x405a56
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push edi
mov ebx, eax
call esi
mov edi, ebx
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 0x18]
push eax
call fcn.00407d62
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405b89
test edi, edi
jne 0x405a74
xor eax, eax
jmp 0x405a7b
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp eax, ebx
jb 0x405b89
mov ecx, dword [ebp + 0x18]
push ebx
push ecx
push edi
call fcn.00407d7f
add esp, 0xc
test eax, eax
jne 0x405b89
push str.VID_0421PID_010
push edi
call fcn.00407db7
add esp, 8
test eax, eax
je 0x405b4a
push str.VID_0421PID_0103
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x405b20
push str.VID_0421PID_0104
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x405b20
push str.VID_0421PID_0105
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x405b20
push str.VID_0421PID_0106
push edi
call fcn.00407db7
add esp, 8
test eax, eax
jne 0x405b20
cmp byte [ebp + 0x20], 1
jne 0x405b73
mov edx, dword [ebp - 0x14]
push edi
inc edx
mov dword [ebp - 0x14], edx
call esi
mov edx, dword [ebp - 0x24]
mov byte [ebp - 4], 1
push edx
call esi
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
mov al, byte [ebp + 0x20]
test al, al
jne 0x405b73
mov ebx, dword [ebp - 0x14]
push edi
inc ebx
mov dword [ebp - 0x14], ebx
call esi
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], 1
push eax
call esi
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
cmp byte [ebp + 0x20], 1
jne 0x405b73
mov edx, dword [ebp - 0x14]
push edi
inc edx
mov dword [ebp - 0x14], edx
call esi
mov ecx, dword [ebp - 0x24]
mov byte [ebp - 4], 1
push ecx
call esi
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp + 8]
push 1
push edx
push eax
call fcn.004050c0
add esp, 0xc
test eax, eax
je 0x405b8c
inc dword [ebp - 0x14]
push edi
call esi
mov ecx, dword [ebp - 0x24]
mov byte [ebp - 4], 1
push ecx
call esi
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
cmp edi, 2
jne 0x405bc9
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
inc eax
push ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 1
call esi
inc dword [ebp - 0x50]
jmp 0x405701
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
inc eax
push ecx
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
call esi
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x18], 0x80004005
push edx
call esi
jmp 0x405c9c
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov esi, eax
lea eax, [esi + ebx]
push eax
push 0
mov dword [ebp - 0x28], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x405c65
mov eax, dword [ebp + 0xc]
lea ecx, [esi + esi]
mov dword [ebp - 0x34], ecx
mov edx, ecx
mov esi, eax
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x30]
lea edi, [edx + ebx]
add ecx, ecx
lea esi, [ebp - 0x26c]
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 - 0x28]
mov word [ebx + ecx*2], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, ebx
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x405c70
xor esi, esi
jmp 0x405c79
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov esi, eax
test edi, edi
je 0x405c88
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp esi, eax
jb 0x405cc0
mov dword [ebp - 0x18], 0x80004005
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x1c]
push edx
call esi
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 1
push edi
push edx
call fcn.004050c0
add esp, 0xc
test eax, eax
je 0x405cd6
inc dword [ebp - 0x14]
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x50]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
push eax
call fcn.00407d62
add esp, 4
test eax, eax
je 0x405c9c
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x405c9c
push eax
call fcn.00407d62
add esp, 4
test eax, eax
je 0x405c9c
mov ecx, dword [ebp - 0x1c]
mov edi, dword [sym.imp.OLEAUT32.dll_VariantInit]
push ecx
call edi
mov edx, dword [ebp - 0x1c]
push eax
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov esi, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
lea eax, [ebp - 0x26c]
mov byte [ebp - 4], 5
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test esi, esi
mov dword [ebp + 0xc], eax
jne 0x405d52
xor edi, edi
jmp 0x405d57
push esi
call edi
mov edi, eax
mov ecx, dword [ebp + 0xc]
lea eax, [edi + ecx]
push eax
push 0
mov dword [ebp - 0x30], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x405dbb
mov esi, dword [ebp - 0x20]
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]
lea esi, [ebp - 0x26c]
add ecx, ecx
lea edi, [eax + ebx]
mov edx, ecx
mov eax, dword [ebp - 0x30]
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 - 0x20]
mov word [ebx + eax*2], 0
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, ebx
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x405dc6
xor edi, edi
jmp 0x405dcf
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edi, eax
test esi, esi
je 0x405dde
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp edi, eax
jb 0x405deb
mov dword [ebp - 0x18], 0x80004005
push esi
jmp 0x405c90
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x4c]
xor edi, edi
push edx
push 0x20019
push edi
push esi
push eax
mov dword [ebp - 0x4c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
mov dword [ebp - 0x18], eax
jne 0x406192
cmp dword [ebp - 0x4c], edi
je 0x406192
xor edx, edx
mov byte [ebp + 0xf], 1
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], edi
test eax, eax
jne 0x406146
cmp edx, 0x64
jge 0x406146
mov ecx, 0x82
lea edi, [ebp - 0x26c]
push eax
push eax
rep stosd dword es:[edi], eax
push eax
push eax
lea ecx, [ebp - 0x3c]
lea eax, [ebp - 0x26c]
push ecx
mov ecx, dword [ebp - 0x4c]
push eax
push edx
push ecx
mov dword [ebp - 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x406134
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
jbe 0x406134
mov edi, dword [sym.imp.OLEAUT32.dll_VariantInit]
push esi
call edi
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov esi, eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x20], esi
test esi, esi
je 0x405e9a
push esi
call edi
cmp word [esi + eax*2 - 2], 0x5c
je 0x405f1e
push 0x41a588
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test esi, esi
mov dword [ebp - 0x34], eax
je 0x405ebd
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov esi, eax
mov edx, dword [ebp - 0x34]
lea eax, [esi + edx]
push eax
push 0
mov dword [ebp - 0x40], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x405f1e
mov eax, dword [ebp - 0x54]
lea ecx, [esi + esi]
mov dword [ebp - 0x20], ecx
mov edx, ecx
mov esi, eax
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x34]
lea edi, [edx + ebx]
add ecx, ecx
mov esi, 0x41a588
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 - 0x40]
mov word [ebx + ecx*2], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 0x20], ebx
lea edx, [ebp - 0x26c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [ebp - 0x20]
mov ebx, eax
test esi, esi
mov dword [ebp - 0x40], ebx
jne 0x405f3b
xor edi, edi
jmp 0x405f44
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edi, eax
lea eax, [edi + ebx]
push eax
push 0
mov dword [ebp - 0x54], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x405fa5
mov esi, dword [ebp - 0x20]
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 - 0x40]
lea esi, [ebp - 0x26c]
add ecx, ecx
lea edi, [eax + ebx]
mov edx, ecx
mov eax, dword [ebp - 0x54]
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 - 0x20]
mov word [ebx + eax*2], 0
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 0x20], ebx
mov esi, ebx
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x405fb0
xor edi, edi
jmp 0x405fb9
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edi, eax
test esi, esi
je 0x405fc8
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp edi, eax
jb 0x405fd7
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [ebp - 0x28]
jmp 0x40616f
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x44]
push edx
push 0x20019
push 0
push esi
push eax
mov dword [ebp - 0x44], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x405fc8
mov edx, dword [ebp - 0x44]
test edx, edx
je 0x405fc8
mov ecx, 0x3f
lea edi, [ebp - 0x46b]
mov byte [ebp - 0x46c], al
mov dword [ebp - 0x64], 0xff
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x5c], 0
stosw word es:[edi], ax
push ecx
lea eax, [ebp - 0x46c]
lea ecx, [ebp - 0x5c]
push eax
mov eax, dword [ebp + 0x14]
push ecx
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 0x44]
mov edi, eax
push ecx
mov dword [ebp - 0x18], edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x406109
cmp dword [ebp - 0x64], 1
jb 0x406109
mov eax, dword [ebp - 0x5c]
cmp eax, 1
je 0x406073
cmp eax, 2
jne 0x406109
mov ebx, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
lea edx, [ebp - 0x46c]
push edx
call ebx
mov edi, eax
mov dword [ebp - 0x40], edi
test edi, edi
mov byte [ebp - 4], 7
je 0x4060ab
push edi
call dword [sym.imp.USER32.dll_CharUpperW]
test eax, eax
je 0x4060ab
push eax
call ebx
push edi
mov ebx, eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, ebx
mov dword [ebp - 0x40], edi
mov eax, dword [ebp + 0x18]
push eax
call fcn.00407d62
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4060f5
test edi, edi
jne 0x4060c5
xor eax, eax
jmp 0x4060cc
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp eax, ebx
jb 0x4060f5
mov ecx, dword [ebp + 0x18]
push ebx
push ecx
push edi
call fcn.00407d7f
add esp, 0xc
test eax, eax
jne 0x4060f5
mov edx, dword [ebp + 8]
push 1
push esi
push edx
call fcn.004050c0
add esp, 0xc
test eax, eax
je 0x406100
mov eax, dword [ebp - 0x2c]
mov byte [ebp + 0xf], 0
inc eax
mov dword [ebp - 0x2c], eax
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x406114
mov eax, dword [ebp - 0x2c]
mov byte [ebp + 0xf], 0
inc eax
mov dword [ebp - 0x2c], eax
push esi
mov byte [ebp - 4], 5
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x18]
jmp 0x405e25
cmp eax, 0x103
je 0x40613f
mov byte [ebp + 0xf], 0
mov dword [ebp - 0x18], 0
mov al, byte [ebp + 0xf]
test al, al
je 0x40616f
test esi, esi
je 0x40616f
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x40616f
mov eax, dword [ebp + 8]
push 0
push esi
push eax
call fcn.004050c0
add esp, 0xc
test eax, eax
je 0x406172
inc dword [ebp - 0x14]
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x50]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
mov ecx, dword [ebp - 0x14]
push esi
inc ecx
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x50]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x50]
inc eax
mov dword [ebp - 0x50], eax
jmp 0x405701
cmp ebx, 2
jne 0x40622c
cmp dword [0x41e04c], esi
je 0x406216
push edi
push str.USB_Key___ls_not_found_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 esi
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, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x41e04c], esi
je 0x406216
push edi
push str.USB_Key___ls_open_failed_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 esi
dec ecx
push 0x41e048
push ecx
mov ecx, dword [0x41e04c]
push str.Key__43EA7BB31D4DD114FAF09271F90BD965_open_failed_r_n
push ecx
jmp 0x406210