Function at 0x401070
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54e29c
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x5a5784]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.GetSettingFromConfigFile__._get_setting_from_registry._n
xor ebx, ebx
push 0x40000
mov dword [ebp - 0x230], ebx
call fcn.0041abf0
add esp, 8
lea eax, [ebp - 0x22c]
push eax
push 1
push ebx
push str.SOFTWAREBrotherDevConnectSNMP
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push str.SOFTWAREBrotherDevConnectSNMP
test eax, eax
jne 0x401702
push str.Access_registry_success:__s__n
push 0x80000
call fcn.0041abf0
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add esp, 0xc
lea ecx, [ebp - 0x224]
push ecx
mov ecx, dword [ebp - 0x22c]
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x21c]
push eax
push ebx
push str.SearchSendTimes
mov esi, 4
push ecx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x234], 0x104
call edi
test eax, eax
jne 0x401185
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], esi
jne 0x40116b
cmp eax, ebx
jbe 0x40116b
push eax
push str.SearchSendTimes
push str.Get___s__registry_key_success._value___d_._n
push 0x80000
mov dword [0x5adf48], eax
call fcn.0041abf0
add esp, 0x10
jmp 0x40119c
push eax
push str.SearchSendTimes
push str.Get___s__registry_key_bad_value___d_._n
push 0x80000
call fcn.0041abf0
add esp, 0x10
jmp 0x40119c
push str.SearchSendTimes
push str.Get___s__registry_key_value_fail._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea edx, [ebp - 0x224]
push edx
mov edx, dword [ebp - 0x22c]
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
push ecx
push ebx
push str.SearchWaitTime
push edx
mov dword [ebp - 0x224], esi
call edi
test eax, eax
jne 0x401215
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], esi
jne 0x4011fb
cmp eax, ebx
jbe 0x4011fb
push eax
push str.SearchWaitTime
push str.Get___s__registry_key_success._value___d_._n
push 0x80000
mov dword [0x5adf4c], eax
call fcn.0041abf0
add esp, 0x10
jmp 0x40122c
push eax
push str.SearchWaitTime
push str.Get___s__registry_key_bad_value___d_._n
push 0x80000
call fcn.0041abf0
add esp, 0x10
jmp 0x40122c
push str.SearchWaitTime
push str.Get___s__registry_key_value_fail._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
mov eax, dword [ebp - 0x22c]
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
push ebx
push str.PWSWaitTime
push eax
mov dword [ebp - 0x224], esi
call edi
test eax, eax
jne 0x4012a5
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], esi
jne 0x40128b
cmp eax, ebx
jbe 0x40128b
push eax
push str.PWSWaitTime
push str.Get___s__registry_key_success._value___d_._n
push 0x80000
mov dword [0x5adf54], eax
call fcn.0041abf0
add esp, 0x10
jmp 0x4012bc
push eax
push str.PWSWaitTime
push str.Get___s__registry_key_bad_value___d_._n
push 0x80000
call fcn.0041abf0
add esp, 0x10
jmp 0x4012bc
push str.PWSWaitTime
push str.Get___s__registry_key_value_fail._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea ecx, [ebp - 0x224]
push ecx
mov ecx, dword [ebp - 0x22c]
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x21c]
push eax
push ebx
push str.PWSRetryNum
push ecx
mov dword [ebp - 0x224], esi
call edi
test eax, eax
jne 0x401335
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], esi
jne 0x40131b
cmp eax, ebx
jbe 0x40131b
push eax
push str.PWSRetryNum
push str.Get___s__registry_key_success._value___d_._n
push 0x80000
mov dword [0x5adf50], eax
call fcn.0041abf0
add esp, 0x10
jmp 0x40134c
push eax
push str.PWSRetryNum
push str.Get___s__registry_key_bad_value___d_._n
push 0x80000
call fcn.0041abf0
add esp, 0x10
jmp 0x40134c
push str.PWSRetryNum
push str.Get___s__registry_key_value_fail._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea edx, [ebp - 0x224]
push edx
mov edx, dword [ebp - 0x22c]
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
push ecx
push ebx
push str.RefreshRetryNum
push edx
mov dword [ebp - 0x224], esi
call edi
test eax, eax
jne 0x4013c5
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], esi
jne 0x4013ab
cmp eax, ebx
jbe 0x4013ab
push eax
push str.RefreshRetryNum
push str.Get___s__registry_key_success._value___d_._n
push 0x80000
mov dword [0x5ae368], eax
call fcn.0041abf0
add esp, 0x10
jmp 0x4013dc
push eax
push str.RefreshRetryNum
push str.Get___s__registry_key_bad_value___d_._n
push 0x80000
call fcn.0041abf0
add esp, 0x10
jmp 0x4013dc
push str.RefreshRetryNum
push str.Get___s__registry_key_value_fail.__n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
mov eax, dword [ebp - 0x22c]
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
push ebx
push str.RefreshWaitTime
push eax
mov dword [ebp - 0x224], esi
call edi
test eax, eax
jne 0x401455
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], esi
jne 0x40143b
cmp eax, ebx
jbe 0x40143b
push eax
push str.RefreshWaitTime
push str.Get___s__registry_key_success._value___d_._n
push 0x80000
mov dword [0x5ae36c], eax
call fcn.0041abf0
add esp, 0x10
jmp 0x40146c
push eax
push str.RefreshWaitTime
push str.Get___s__registry_key_bad_value___d_._n
push 0x80000
call fcn.0041abf0
add esp, 0x10
jmp 0x40146c
push str.RefreshWaitTime
push str.Get___s__registry_key_value_fail_._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea ecx, [ebp - 0x234]
push ecx
mov ecx, dword [ebp - 0x22c]
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x21c]
push eax
push ebx
push str.GetCommunityName
push ecx
call edi
or esi, 0xffffffff
cmp eax, ebx
jne 0x40159c
mov ebx, 1
cmp dword [ebp - 0x21c], ebx
jne 0x4014d2
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x228]
call fcn.00401e60
push 0x57e928
push eax
mov dword [ebp - 0x230], ebx
call fcn.00401730
add esp, 8
test al, al
jne 0x4014d4
xor bl, bl
test byte [ebp - 0x230], 1
je 0x401505
mov eax, dword [ebp - 0x228]
and dword [ebp - 0x230], 0xfffffffe
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401505
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x218]
push ecx
test bl, bl
je 0x40154a
push 0x104
push 0x5ae160
call fcn.0052443c
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x228]
call fcn.00401e60
mov dword [ebp - 4], 0
mov eax, dword [eax]
push eax
push str.GetCommunityName
push str.Get___s__registry_key_value_success._value___s_._n
jmp 0x401569
lea ecx, [ebp - 0x228]
call fcn.00401e60
mov dword [ebp - 4], 1
mov edx, dword [eax]
push edx
push str.GetCommunityName
push str.Get___s__registry_key_bad_value___s_._n
push 0x80000
call fcn.0041abf0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4015b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4015b3
push str.GetCommunityName
push str.Get___s__registry_key_value_fail.__n
push 0x80000
call fcn.0041abf0
add esp, 0xc
lea ecx, [ebp - 0x234]
push ecx
mov ecx, dword [ebp - 0x22c]
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x21c]
push eax
push 0
push str.SetCommunityName
push ecx
mov dword [ebp - 0x234], 0x104
call edi
test eax, eax
jne 0x4016f6
cmp dword [ebp - 0x21c], 1
jne 0x401622
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x228]
call fcn.00401e60
or dword [ebp - 0x230], 2
push 0x57e928
push eax
call fcn.00401730
add esp, 8
test al, al
je 0x401622
mov bl, 1
jmp 0x401624
xor bl, bl
test byte [ebp - 0x230], 2
je 0x40164e
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40164e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x218]
push ecx
test bl, bl
je 0x4016a6
push 0x104
push 0x5adf58
call fcn.0052443c
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x228]
call fcn.00401e60
mov dword [ebp - 4], 2
mov eax, dword [eax]
push eax
push str.SetCommunityName
push str.Get___s__registry_key_success._value___s_._n
push 0x80000
call fcn.0041abf0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x228]
jmp 0x4016d8
lea ecx, [ebp - 0x238]
call fcn.00401e60
mov dword [ebp - 4], 3
mov edx, dword [eax]
push edx
push str.SetCommunityName
push str.Get___s__registry_key_bad_value___s_._n
push 0x80000
call fcn.0041abf0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x238]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jg 0x401714
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401714
push str.SetCommunityName
push str.Get___s__registry_key_value_fail.__n
jmp 0x401707
push str.Access_registry_fail___s_._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052442d
mov esp, ebp
pop ebp
ret