Function at 0x40ff23
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x1bc]
sub esp, 0x23c
mov eax, dword [0x414050]
push ebx
push esi
push edi
push 0x408010
xor ebx, ebx
push 0xa
mov dword [ebp + 0x1b8], eax
mov dword [ebp - 0x7c], 0x104
mov dword [ebp - 0x5c], ebx
call fcn.0040da55
mov eax, dword [ebp + 0x1cc]
push dword [eax]
push 0x407fd4
push ebx
call fcn.0040da55
mov esi, dword [ebp + 0x1d4]
push esi
push 0x407f94
push 0xa
call fcn.0040da55
add esp, 0x20
lea eax, [ebp - 0x70]
push eax
push 0x20019
push ebx
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
cmp edi, ebx
je 0x40ffcc
push edi
push esi
push 0x407f38
push 0x14
call fcn.0040da55
add esp, 0x10
push edi
push esi
push 0x80001393
call fcn.0040d7f8
push 0x407f0c
push 0xa
call fcn.0040da55
pop ecx
pop ecx
jmp 0x410486
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xb0]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push 0x4060a0
push dword [ebp - 0x70]
mov byte [ebp + 0x1b4], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
je 0x410008
push eax
push esi
push 0x407eb0
push 0x14
call fcn.0040da55
add esp, 0x10
jmp 0x410084
lea eax, [ebp + 0xb0]
push eax
push 0x407e74
push 0xa
call fcn.0040da55
add esp, 0xc
mov esi, 0x105
push esi
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edi, eax
cmp edi, ebx
je 0x41005b
cmp edi, esi
ja 0x41005b
lea eax, [ebp - 0x58]
push eax
push 0x407e3c
push 0xa
call fcn.0040da55
add esp, 0xc
mov dword [ebp - 0x68], 1
jmp 0x410087
push edi
lea eax, [ebp + 0xb0]
push eax
push 0x407de0
push 0x14
call fcn.0040da55
add esp, 0x10
push edi
lea eax, [ebp + 0xb0]
push eax
push 0x40001397
call fcn.0040d7f8
mov dword [ebp - 0x68], ebx
push 0x407da0
push 0xa
call fcn.0040da55
pop ecx
pop ecx
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x1c8], ebx
mov dword [ebp - 0x64], ebx
jbe 0x410464
mov edi, dword [ebp + 0x1c4]
mov dword [ebp + 0x1d4], edi
push dword [edi]
push dword [ebp - 0x64]
push 0x407d6c
push ebx
call fcn.0040da55
mov ecx, dword [edi]
mov eax, ecx
add esp, 0x10
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4100d3
sub eax, esi
mov dword [ebp - 0x60], ecx
jmp 0x41042a
push 0x407d68
push dword [ebp - 0x60]
call dword [sym.imp.msvcrt.dll_strstr]
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x410435
sub eax, dword [edi]
inc esi
inc esi
mov dword [ebp - 0x78], eax
mov eax, esi
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x60], esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x410110
sub eax, ecx
mov dword [ebp + 0x1c4], eax
je 0x41043c
push esi
call dword [sym.imp.msvcrt.dll_atol]
cmp eax, ebx
pop ecx
mov dword [ebp + 0x1c4], eax
jne 0x410161
cmp byte [esi], 0x30
je 0x410161
push 0x407d20
push 0xa
call fcn.0040da55
pop ecx
lea eax, [esi - 1]
pop ecx
mov dword [ebp - 0x60], eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x410153
sub eax, ecx
jmp 0x41042a
cmp dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
je 0x410205
lea esi, [ebp - 0x58]
push 0x3b
push esi
call dword [sym.imp.msvcrt.dll_strchr]
mov ebx, eax
xor edi, edi
cmp ebx, edi
pop ecx
pop ecx
je 0x410186
mov byte [ebx], 0
push esi
push dword [ebp + 0x1c4]
push 0x407cc0
push 0xa
call fcn.0040da55
add esp, 0x10
push esi
call fcn.0040fecd
cmp eax, edi
jne 0x4101ac
push esi
call fcn.0040fe14
cmp ebx, edi
je 0x4101b3
mov byte [ebx], 0x3b
cmp eax, edi
mov dword [ebp - 0x5c], edi
je 0x4101e7
push edi
push 0x50
lea ecx, [ebp - 0x5c]
push ecx
push edi
push dword [ebp + 0x1c4]
push eax
push 0xb00
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
mov dword [ebp - 0x6c], eax
jne 0x41028a
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [ebp - 0x5c], 0
mov esi, ebx
inc ebx
neg esi
sbb esi, esi
and esi, ebx
jne 0x410170
xor ebx, ebx
push dword [ebp - 0x6c]
push 0x407c70
push 0xa
call fcn.0040da55
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 0xc
push dword [ebp - 0x5c]
call esi
push 0x407c34
push 0xa
mov dword [ebp - 0x5c], ebx
call fcn.0040da55
pop ecx
pop ecx
push ebx
push 0x50
lea eax, [ebp - 0x5c]
push eax
push ebx
push dword [ebp + 0x1c4]
push dword [ebp + 0x1d8]
push 0xb00
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edi, eax
cmp edi, ebx
jne 0x41028a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push 0x407bf0
push 0xa
call fcn.0040da55
add esp, 0xc
push ebx
push dword [ebp + 0x1c4]
push 0x400013a0
call fcn.0040d6c4
push dword [ebp - 0x5c]
call esi
and dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x74]
push 2
pop ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410293
sub eax, esi
jmp 0x4102d3
mov esi, dword [ebp - 0x60]
movsx eax, byte [esi]
push eax
call dword [sym.imp.msvcrt.dll_isdigit]
test eax, eax
pop ecx
je 0x4102db
xor eax, eax
mov al, byte [esi]
inc ebx
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x4102c1
inc esi
inc esi
mov eax, esi
mov dword [ebp - 0x60], esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4102ca
sub eax, edx
mov dword [ebp + 0x1c4], eax
jne 0x41029e
mov eax, dword [ebp + 0x1d4]
mov ecx, dword [eax]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4102e8
sub eax, esi
sub eax, ebx
lea esi, [eax + edi + 1]
mov eax, ecx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4102fc
sub eax, ecx
inc eax
push esi
push eax
push 0x407ba0
push 0
mov dword [ebp + 0x1c4], eax
call fcn.0040da55
add esp, 0x10
cmp esi, dword [ebp + 0x1c4]
jbe 0x4103b0
mov eax, dword [ebp + 0x1d4]
push esi
push dword [eax]
call sub.snmpapi.dll_SnmpUtilMemReAlloc
mov esi, eax
test esi, esi
je 0x41049e
push esi
push 0x407b64
push 0xa
call fcn.0040da55
mov eax, dword [ebp + 0x1d4]
mov dword [eax], esi
mov eax, dword [ebp - 0x78]
add esi, eax
lea eax, [edi + esi]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x1cc]
mov ecx, edi
sub ecx, ebx
add dword [eax], ecx
mov eax, dword [eax]
push eax
sub eax, edi
add eax, ebx
push eax
push 0x407b18
push 0
call fcn.0040da55
mov eax, esi
add esp, 0x1c
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x410389
sub eax, ecx
inc eax
push eax
mov eax, edi
sub eax, ebx
mov ebx, dword [sym.imp.msvcrt.dll_memmove]
add eax, esi
push esi
push eax
call ebx
push edi
push dword [ebp - 0x5c]
push esi
call ebx
add esp, 0x18
jmp 0x4103eb
push 0x407ad8
push 0xa
call fcn.0040da55
mov esi, dword [ebp - 0x74]
mov eax, dword [ebp + 0x1cc]
sub dword [eax], ebx
dec esi
dec esi
add ebx, esi
pop ecx
mov eax, ebx
pop ecx
mov dword [ebp - 0x60], esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4103d5
sub eax, ecx
inc eax
push eax
push ebx
push esi
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
test edi, edi
je 0x4103fc
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [ebp - 0x5c], 0
mov eax, dword [ebp + 0x1d4]
push dword [eax]
push 0x407aac
push 0
call fcn.0040da55
mov eax, dword [ebp - 0x60]
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x410419
mov edi, dword [ebp + 0x1d4]
sub eax, ecx
xor ebx, ebx
cmp eax, 2
ja 0x4100e4
jmp 0x410449
push 0x407a70
jmp 0x410441
push 0x407a34
push ebx
call fcn.0040da55
pop ecx
pop ecx
inc dword [ebp - 0x64]
mov eax, dword [ebp - 0x64]
add edi, 4
cmp eax, dword [ebp + 0x1c8]
mov dword [ebp + 0x1d4], edi
jb 0x4100b9
mov eax, dword [ebp + 0x1cc]
push dword [eax]
push 0x4079fc
push ebx
call fcn.0040da55
push 0x4079cc
push 0xa
call fcn.0040da55
add esp, 0x14
mov ecx, dword [ebp + 0x1b8]
pop edi
pop esi
pop ebx
call fcn.00412af8
add ebp, 0x1bc
leave
ret 0x18
push 0x407970
push 0x14
call fcn.0040da55
pop ecx
pop ecx
push 0xc0000bc6
call fcn.0040d56f
mov eax, dword [ebp + 0x1cc]
push dword [eax]
push 0x4079fc
push 0
call fcn.0040da55
add esp, 0xc
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x410486