Function at 0x40b3a9
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x41e178
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 0x40b796
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 0x40b4b4
cmp dword [ebp - 0x10], ebx
je 0x40b4b4
push dword [ebp - 0x10]
call dword [0x63e0cc]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x34], ebx
je 0x40b4ca
cmp dword [ebp - 0x10], ebx
je 0x40b4db
push dword [ebp - 0x10]
call dword [0x63e0cc]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x10], ebx
je 0x40b4db
push dword [ebp - 0x10]
call dword [0x63e0cc]
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 0x40b796
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 [0x63e158]
cmp eax, ebx
jne 0x40b785
push 0xf423f
push ebx
call dword [0x63e164]
push eax
call dword [0x63e0fc]
mov dword [ebp - 0x14], eax
push str.Soft:_WinSCP_n
push dword [ebp - 0x14]
call dword [0x63e110]
push 0x423cac
push dword [ebp - 0x14]
call dword [0x63e110]
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 [0x63e110]
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 0x40b5d2
push dword [ebp - 0x24]
lea eax, [ebp - 0x50]
push eax
call fcn.0040fe85
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.0040e79b
push eax
push dword [ebp - 0x14]
call dword [0x63e110]
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], bl
call fcn.0040e5cf
jmp 0x40b5e0
push 0x423ccc
push dword [ebp - 0x14]
call dword [0x63e110]
push 0x423cd0
push dword [ebp - 0x14]
call dword [0x63e110]
push 0x423cd4
push dword [ebp - 0x14]
call dword [0x63e110]
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 [0x63e110]
push 0x423ce8
push dword [ebp - 0x14]
call dword [0x63e110]
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 0x423cf8
push dword [ebp - 0x14]
call dword [0x63e110]
push 0x4239c3
lea eax, [ebp - 0x954]
push eax
call dword [0x63e13c]
test eax, eax
je 0x40b6bd
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.0040aef3
add esp, 0x10
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0040e79b
push eax
push dword [ebp - 0x14]
call dword [0x63e110]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.0040e5cf
push 0x423d04
push dword [ebp - 0x14]
call dword [0x63e110]
push 0x423d08
push dword [ebp - 0x14]
call dword [0x63e110]
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 [0x63e158]
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 0x40b52d
push dword [ebp - 0x14]
call dword [0x63e020]
push eax
push dword [ebp - 0x14]
sub esp, 0xc
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x423d0c
call fcn.0040e564
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.00412c9f
add esp, 0x68
lea ecx, [ebp - 0x40]
call fcn.0040e5cf
push 4
lea eax, [ebp - 0x14]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 0x10], ebx
je 0x40b796
push dword [ebp - 0x10]
call dword [0x63e0cc]
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