Function at 0x4025e0
Capabilities:
Print debug messages
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 0x510
push ebx
mov ebx, dword [esp + 0x51c]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push edi
push str.query_registry:_a_n
mov byte [ebx], 0
call ebp
mov esi, dword [esp + 0x524]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
push esi
lea eax, [esp + 0x124]
push str.query_registry:_CA_getenv___s__n
push eax
mov dword [esp + 0x24], 0x100
xor edi, edi
call fcn.004143bf
add esp, 0xc
lea ecx, [esp + 0x120]
push ecx
call ebp
push esi
call fcn.00414b09
mov edx, eax
add esp, 4
test edx, edx
je 0x402679
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x524]
mov edi, 1
push edx
push ebx
push esi
lea ecx, [esp + 0x12c]
push str.query_registry:_CC_getenv___s__s___x_n
push ecx
call fcn.004143bf
add esp, 0x14
lea edx, [esp + 0x120]
push edx
call ebp
push ebx
push esi
lea eax, [esp + 0x128]
push str.query_registry:_d_:_s:_s:_n
push eax
call fcn.004143bf
add esp, 0x10
lea ecx, [esp + 0x120]
push ecx
call ebp
test edi, edi
jne 0x4027c1
lea edx, [esp + 0x14]
push edx
push 1
push edi
push str.SOFTWARESDI
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4027b7
push str.query_registry:_b_n
call ebp
lea eax, [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push edx
push edi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402742
lea edi, [esp + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.query_registry:_c_n
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, dword [esp + 0x524]
mov dword [esp + 0x10], 1
jmp 0x40274a
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4027a8
push 0xff
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, eax
test edi, edi
je 0x4027a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push esi
lea ecx, [esp + 0x12c]
push str.Win_Specific_query_registry:_CA_getenv___s____s___ld_n
push ecx
call fcn.004143bf
add esp, 0x14
lea edx, [esp + 0x120]
push edx
call ebp
cmp edi, 0xff
jge 0x4027a8
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x510
ret
mov dword [esp + 0x10], 0
jmp 0x40275d
mov cl, byte [ebx]
xor eax, eax
test cl, cl
je 0x4027ee
mov dl, 0x5c
mov cl, byte [eax + ebx]
cmp cl, dl
jne 0x4027e5
cmp byte [eax + ebx + 1], dl
jne 0x4027dd
add eax, 2
jmp 0x4027e5
cmp cl, dl
jne 0x4027e5
mov byte [eax + ebx], 0x2f
mov cl, byte [eax + ebx + 1]
inc eax
test cl, cl
jne 0x4027cb
push ebx
push esi
lea eax, [esp + 0x128]
push str.query_registry:_e_:_s:_s:_n
push eax
call fcn.004143bf
add esp, 0x10
lea ecx, [esp + 0x120]
push ecx
call ebp
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x510
ret