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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42dae6
mov eax, dword fs:[0]
push eax
sub esp, 0x348
mov eax, dword [0x43b050]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push esi
push edi
mov eax, dword [0x43b050]
xor eax, esp
push eax
lea eax, [esp + 0x358]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
push 0x104
mov edi, edx
lea edx, [esp + 0x249]
push 0
push edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], 0
mov byte [esp + 0x250], 0
call fcn.00421960
add esp, 0xc
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x24c]
push 0x104
push eax
call fcn.00420663
add esp, 0x10
push esi
lea ecx, [esp + 0x248]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 3
lea eax, [esp + 0x248]
lea edx, [esp + 0x144]
push eax
lea ecx, [esp + 0x144]
mov dword [esp + 0x144], edx
call fcn.004049f0
lea ecx, [esp + 0x18]
push ecx
push 0x20019
xor ebx, ebx
push ebx
push esi
push edi
mov dword [esp + 0x374], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407202
mov eax, dword [esp + 0x1c]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x2c], esi
cmp esi, 0xffffffff
je 0x4071f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406f90
push ebx
lea ecx, [esp + 0x20]
push ecx
push 2
lea edx, [esp + 0x30]
push edx
push esi
mov dword [esp + 0x38], 0xfffffeff
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [esp + 0x20]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406fa4
sub eax, edx
je 0x4070c4
mov ecx, 0x435be0
mov eax, edi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x406fe0
test dl, dl
je 0x406fdc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x406fe0
add eax, 2
add ecx, 2
test dl, dl
jne 0x406fc0
xor eax, eax
jmp 0x406fe5
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x4070c4
push 3
lea eax, [esp + 0x3c]
push edi
lea ecx, [esp + 0x3c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], eax
call fcn.004049f0
lea ecx, [esp + 0x10]
push ecx
push ebx
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x36c], 1
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push ecx
call ebx
test eax, eax
je 0x40704e
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x38]
cmp eax, edx
je 0x4071ea
push eax
call fcn.004202bd
jmp 0x4071e7
mov eax, dword [esp + 0x10]
add eax, 2
push eax
mov dword [esp + 0x14], eax
call fcn.0042136f
mov edi, eax
add esp, 4
test edi, edi
jne 0x407083
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x38]
cmp eax, ecx
je 0x4071ea
push eax
call fcn.004202bd
jmp 0x4071e7
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x1c]
push edi
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call ebx
test eax, eax
jne 0x407033
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x13c]
mov edx, dword [esp + 0x34]
push eax
push edi
push ecx
mov ecx, dword [esp + 0x20]
call fcn.004072d0
mov esi, dword [esp + 0x2c]
jmp 0x407033
push ebx
push ebx
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x38]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x4071ea
mov eax, dword [esp + 0x14]
add dword [esp + 0x10], 2
add eax, 2
push eax
mov dword [esp + 0x18], eax
call fcn.0042136f
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x4071ea
mov ecx, dword [esp + 0x10]
lea edx, [ecx + ecx]
push edx
call fcn.0042136f
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40713e
push edi
call fcn.004202bd
jmp 0x4071e7
mov eax, dword [esp + 0x14]
push eax
push 0
push edi
call fcn.00421960
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea edx, [ecx + ecx]
push edx
push 0
push ebx
call fcn.00421960
xor esi, esi
add esp, 0xc
mov dword [esp + 0x1c], esi
cmp dword [esp + 0x28], esi
jbe 0x4071d4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x1c]
push edi
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
push 0
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x40]
push ecx
push ebx
push esi
push edx
mov dword [esp + 0x44], 0
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x4071c9
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x13c]
mov esi, dword [esp + 0x2c]
push eax
push edi
push ecx
mov ecx, dword [esp + 0x30]
mov edx, ebx
call fcn.004072d0
mov esi, dword [esp + 0x1c]
inc esi
mov dword [esp + 0x1c], esi
cmp esi, dword [esp + 0x28]
jb 0x40716d
push edi
call fcn.004202bd
add esp, 4
push ebx
call fcn.004202bd
mov esi, dword [esp + 0x30]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x407202
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x13c]
lea edx, [esp + 0x140]
cmp eax, edx
je 0x40721d
push eax
call fcn.004202bd
add esp, 4
mov ecx, dword [esp + 0x358]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret 0xc