Function at 0x40b1ae
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x41daae
call sub.msvcrt.dll__EH_prolog
sub esp, 0xd48
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x153]
push ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x154], bl
call sub.msvcrt.dll_memset
mov esi, 0x3ff
push esi
lea eax, [ebp - 0xd53]
push ebx
push eax
mov dword [ebp - 0x18], 0x104
mov byte [ebp - 0xd54], bl
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0x553]
push ebx
push eax
mov byte [ebp - 0x554], bl
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0x953]
push ebx
push eax
mov byte [ebp - 0x954], bl
call sub.msvcrt.dll_memset
inc esi
push esi
lea eax, [ebp - 0xd54]
push ebx
push eax
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0x554]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x48
push esi
lea eax, [ebp - 0x954]
push ebx
push eax
call sub.msvcrt.dll_memset
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push 1
push ebx
push str.SoftwareMartin_PrikrylWinSCP_2Configuration
push SysReAllocString
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], esi
call edi
test eax, eax
jne 0x40b59b
mov esi, dword [sym.imp.ADVAPI32.dll_RegGetValueA]
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x34]
push eax
push ebx
push 0x10
push str.UseMasterPassword
push str.Security
push dword [ebp - 0x10]
call esi
test eax, eax
je 0x40b2b9
cmp dword [ebp - 0x10], ebx
je 0x40b2b9
push dword [ebp - 0x10]
call dword [0xb3a44c]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x34], ebx
je 0x40b2cf
cmp dword [ebp - 0x10], ebx
je 0x40b2e0
push dword [ebp - 0x10]
call dword [0xb3a44c]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x10], ebx
je 0x40b2e0
push dword [ebp - 0x10]
call dword [0xb3a44c]
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x10]
push eax
push 9
push ebx
push str.SoftwareMartin_PrikrylWinSCP_2Sessions
push SysReAllocString
call edi
test eax, eax
jne 0x40b59b
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x154]
push eax
push ebx
push dword [ebp - 0x10]
call dword [0xb3a4d8]
cmp eax, ebx
jne 0x40b58a
push 0xf423f
push ebx
call dword [0xb3a4e4]
push eax
call dword [0xb3a47c]
mov dword [ebp - 0x14], eax
push str.Soft:_WinSCP_n
push dword [ebp - 0x14]
call dword [0xb3a490]
push 0x422c3c
push dword [ebp - 0x14]
call dword [0xb3a490]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0xd54]
push eax
push ebx
push 2
push str.HostName
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0xd54]
push eax
push dword [ebp - 0x14]
call dword [0xb3a490]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push 0xffff
push str.PortNumber
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x20], 4
call esi
test eax, eax
jne 0x40b3d7
push dword [ebp - 0x24]
lea eax, [ebp - 0x50]
push eax
call fcn.0040fc89
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.0040e59f
push eax
push dword [ebp - 0x14]
call dword [0xb3a490]
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], bl
call fcn.0040e3d3
jmp 0x40b3e5
push 0x422c5c
push dword [ebp - 0x14]
call dword [0xb3a490]
push 0x422c60
push dword [ebp - 0x14]
call dword [0xb3a490]
push 0x422c64
push dword [ebp - 0x14]
call dword [0xb3a490]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x554]
push eax
push ebx
push 2
push str.UserName
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x554]
push eax
push dword [ebp - 0x14]
call dword [0xb3a490]
push 0x422c78
push dword [ebp - 0x14]
call dword [0xb3a490]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x954]
push eax
push ebx
push 2
push str.Password
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x10]
call esi
push 0x422c88
push dword [ebp - 0x14]
call dword [0xb3a490]
push 0x422953
lea eax, [ebp - 0x954]
push eax
call dword [0xb3a4bc]
test eax, eax
je 0x40b4c2
lea eax, [ebp - 0x954]
push eax
lea eax, [ebp - 0x554]
push eax
lea eax, [ebp - 0xd54]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040acf8
add esp, 0x10
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0040e59f
push eax
push dword [ebp - 0x14]
call dword [0xb3a490]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.0040e3d3
push 0x422c94
push dword [ebp - 0x14]
call dword [0xb3a490]
push 0x422c98
push dword [ebp - 0x14]
call dword [0xb3a490]
inc dword [ebp - 0x1c]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x18], 0x104
push dword [ebp - 0x10]
call dword [0xb3a4d8]
push ebx
mov edi, eax
lea eax, [ebp - 0x554]
push ebx
push eax
call sub.msvcrt.dll_memset
push ebx
lea eax, [ebp - 0x954]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
cmp edi, 0x103
jne 0x40b332
push dword [ebp - 0x14]
call dword [0xb3a3a0]
push eax
push dword [ebp - 0x14]
sub esp, 0xc
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x422c9c
call fcn.0040e368
sub esp, 0x50
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
mov byte [ebp - 4], 3
call fcn.0040117e
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], bl
call fcn.004126b6
add esp, 0x68
lea ecx, [ebp - 0x40]
call fcn.0040e3d3
push 4
lea eax, [ebp - 0x14]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 0x10], ebx
je 0x40b59b
push dword [ebp - 0x10]
call dword [0xb3a44c]
mov dword [ebp - 0x10], ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0040113a
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret