Function at 0x4041c0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x808
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push eax
push 1
push 0
push str.Environment
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40420a
push 0
push str.Error
push 0x40b154
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x808
ret 4
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push str.TNS_ADMIN
push eax
mov dword [esp + 0x2c], 0x800
call ebx
mov ebp, dword [esp + 0x81c]
test eax, eax
jne 0x4042a9
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4042a9
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x17], 0x5c
jne 0x40427d
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea ecx, [esp + 0x18]
push ecx
push str._s_tnsnames.ora
push ebp
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp]
push 0x40bad4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x4046be
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x18]
mov edx, dword [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0
push str.PATH
push edx
mov dword [esp + 0x2c], 0x800
call ebx
test eax, eax
jne 0x40439f
lea eax, [esp + 0x18]
lea ebx, [esp + 0x18]
test eax, eax
je 0x40439f
cmp byte [ebx], 0
je 0x40439f
push 0x40b148
push ebx
mov esi, ebx
call dword [sym.imp.MSVCRT.dll__mbsstr]
add esp, 8
test eax, eax
jne 0x404312
xor ebx, ebx
jmp 0x404318
lea ebx, [eax + 1]
mov byte [eax], 0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 6
jb 0x404397
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ecx + esi - 1], 0x5c
jne 0x40434a
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + esi - 1], al
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 0x40b144
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ecx + esi - 3]
push edi
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x404397
push esi
push str._snetwork_admin_tnsnames.ora
push ebp
mov byte [edi], al
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp]
push 0x40bad4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x404526
test ebx, ebx
jne 0x4042f0
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edx
push eax
push 0
push 0
push str.ORACLE_HOME
push ecx
mov dword [esp + 0x2c], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40443b
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40443b
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x17], 0x5c
jne 0x404409
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea edx, [esp + 0x18]
push edx
push str._s_network_admin_tnsnames.ora
push ebp
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp]
push 0x40bad4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
je 0x40443b
mov eax, dword [esp + 0x10]
push eax
jmp 0x4046c3
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x40c428
push ebp
call sub.MFC42.DLL_CString::Format
add esp, 8
lea edx, [esp + 0x10]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404494
push 0
push str.Error
push 0x40b154
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x808
ret 4
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x18]
mov edx, dword [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0
push str.TNS_ADMIN
push edx
mov dword [esp + 0x2c], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404530
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x404530
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x17], 0x5c
jne 0x4044fe
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea eax, [esp + 0x18]
push eax
push str._s_tnsnames.ora
push ebp
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp]
push 0x40bad4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
je 0x404530
mov ecx, dword [esp + 0x10]
push ecx
jmp 0x4046c3
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edx
push eax
push 0
push 0
push str.PATH
push ecx
mov dword [esp + 0x2c], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40462a
lea edx, [esp + 0x18]
lea ebx, [esp + 0x18]
test edx, edx
je 0x40462a
cmp byte [ebx], 0
je 0x40462a
push 0x40b148
push ebx
mov esi, ebx
call dword [sym.imp.MSVCRT.dll__mbsstr]
add esp, 8
test eax, eax
jne 0x40459d
xor ebx, ebx
jmp 0x4045a3
lea ebx, [eax + 1]
mov byte [eax], 0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 6
jb 0x404622
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ecx + esi - 1], 0x5c
jne 0x4045d5
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + esi - 1], al
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 0x40b144
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ecx + esi - 3]
push edi
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x404622
push esi
push str._snetwork_admin_tnsnames.ora
push ebp
mov byte [edi], al
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp]
push 0x40bad4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x404431
test ebx, ebx
jne 0x40457b
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x800
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push str.ORACLE_HOME
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4046e5
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4046e5
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x17], 0x5c
jne 0x404696
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea ecx, [esp + 0x18]
push ecx
push str._s_network_admin_tnsnames.ora
push ebp
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp]
push 0x40bad4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4046e5
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x808
ret 4
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x40c428
mov ecx, ebp
call sub.MFC42.DLL_CString::operator_1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x808
ret 4