Function at 0x407540
Capabilities:
Get hostname
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1a74
call fcn.004084b0
mov dword [ebp - 0x1a5c], 0
mov dword [ebp - 0x414], 0
mov dword [ebp - 0x6b0], 0
mov dword [ebp - 0x49c], 0
mov dword [ebp - 0x1a58], 0
mov dword [ebp - 0x498], 0
mov dword [ebp - 0x1850], 0
mov dword [ebp - 0x42c], str.B1F0D3A2_CCDB_11d2_8757_00C04F94A989
mov dword [ebp - 0x428], str.EFCDCEE0_CCDB_11d2_8757_00C04F94A989
mov dword [ebp - 0x424], str.EFCDCEE1_CCDB_11d2_8757_00C04F94A989
mov dword [ebp - 0x420], 0x40ec0c
mov dword [ebp - 0x41c], str.SQL_Server
mov dword [ebp - 0x418], 0x40ec50
mov dword [ebp - 0x494], str.F963E600_CCDB_11d2_8757_00C04F94A989
mov dword [ebp - 0x490], str.F963E601_CCDB_11d2_8757_00C04F94A989
mov dword [ebp - 0x48c], str.FFF1B9E0_CCDB_11d2_8757_00C04F94A989
mov dword [ebp - 0x488], str.Microsoft_Corporation
mov dword [ebp - 0x484], str.OLAP_Server
mov dword [ebp - 0x480], str.8.00
mov dword [ebp - 0x1a54], 0
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x184c]
push ecx
call fcn.00403d23
add esp, 8
mov dword [ebp - 0x1a5c], eax
cmp dword [ebp - 0x1a5c], 0
je 0x407642
mov eax, dword [ebp - 0x1a5c]
jmp 0x407c9f
mov dword [0x40ee70], 3
mov dword [0x40ee88], 3
mov dword [0x40eea0], 3
mov dword [0x40eeb8], 3
mov dword [0x40eed0], 3
mov dword [0x40eee8], 3
cmp dword [ebp + 0xc], 1
jne 0x40776d
lea edx, [ebp - 0xfdc]
mov dword [0x40ee78], edx
lea eax, [ebp - 0xf8c]
mov dword [0x40ee90], eax
lea ecx, [ebp - 0xf3c]
mov dword [0x40eea8], ecx
lea edx, [ebp - 0x1848]
mov dword [0x40eec0], edx
lea eax, [ebp - 0x1740]
mov dword [0x40eed8], eax
push 0xa
lea ecx, [ebp - 0x1a70]
push ecx
mov edx, dword [ebp - 0x1638]
push edx
call sub.MSVCRT.dll__itow
add esp, 0xc
lea eax, [ebp - 0x1a70]
push eax
mov ecx, dword [ebp + 0x10]
add ecx, 0xe88
push ecx
call sub.MSVCRT.dll_wcscpy
add esp, 8
push 0xa
lea edx, [ebp - 0x1a70]
push edx
mov eax, dword [ebp - 0x1634]
push eax
call sub.MSVCRT.dll__itow
add esp, 0xc
push 0x40ed90
mov ecx, dword [ebp + 0x10]
add ecx, 0xe88
push ecx
call sub.MSVCRT.dll_wcscat
add esp, 8
lea edx, [ebp - 0x1a70]
push edx
mov eax, dword [ebp + 0x10]
add eax, 0xe88
push eax
call sub.MSVCRT.dll_wcscat
add esp, 8
mov ecx, dword [ebp + 0x10]
add ecx, 0xe88
mov dword [0x40eef0], ecx
mov edx, dword [ebp + 0x10]
push edx
push 1
call fcn.00403b7c
add esp, 8
push 0x40ed94
lea eax, [ebp - 0x1a50]
push eax
call sub.MSVCRT.dll_wcscpy
add esp, 8
jmp 0x4077d7
mov ecx, dword [ebp - 0x494]
mov dword [0x40ee78], ecx
mov edx, dword [ebp - 0x490]
mov dword [0x40ee90], edx
mov eax, dword [ebp + 0x10]
add eax, 0xc30
mov dword [0x40eea8], eax
mov ecx, dword [ebp - 0x488]
mov dword [0x40eec0], ecx
mov edx, dword [ebp - 0x484]
mov dword [0x40eed8], edx
mov eax, dword [ebp - 0x480]
mov dword [0x40eef0], eax
mov ecx, dword [ebp + 0x10]
push ecx
push 9
call fcn.00403b7c
add esp, 8
push str.OLAPServer
lea edx, [ebp - 0x1a50]
push edx
call sub.MSVCRT.dll_wcscat
add esp, 8
call fcn.0040478e
cmp eax, 1
jne 0x407811
push 0x104
lea eax, [ebp - 0x8bc]
push eax
call fcn.00404961
add esp, 8
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
je 0x40780f
mov eax, dword [ebp - 0x6b0]
jmp 0x407c9f
jmp 0x40782f
lea ecx, [ebp - 0x8bc]
push ecx
call fcn.004047e7
add esp, 4
test eax, eax
jne 0x40782f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407c9f
mov dword [0x40f140], 3
lea edx, [ebp - 0x8bc]
mov dword [0x40f148], edx
mov dword [0x40f458], 3
lea eax, [ebp - 0x1a50]
mov dword [0x40f460], eax
mov dword [ebp - 0x414], 0x208
lea ecx, [ebp - 0x414]
push ecx
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x407892
lea eax, [ebp - 0x8bc]
push eax
lea ecx, [ebp - 0x208]
push ecx
call sub.MSVCRT.dll_wcscpy
add esp, 8
push str.MSSQLSERVER
mov edx, dword [ebp + 0x10]
add edx, 0x820
push edx
call sub.MSVCRT.dll_wcscmp
add esp, 8
test eax, eax
je 0x4078da
push 0x40edd8
lea eax, [ebp - 0x208]
push eax
call sub.MSVCRT.dll_wcscat
add esp, 8
mov ecx, dword [ebp + 0x10]
add ecx, 0x820
push ecx
lea edx, [ebp - 0x208]
push edx
call sub.MSVCRT.dll_wcscat
add esp, 8
mov dword [0x40f398], 3
lea eax, [ebp - 0x208]
mov dword [0x40f3a0], eax
mov dword [0x40eff0], 3
mov dword [0x40eff8], 0x40eddc
cmp dword [ebp + 0xc], 1
jne 0x40791c
lea ecx, [ebp - 0x184c]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.004033a4
add esp, 8
lea eax, [ebp - 0x6ac]
push eax
call fcn.00405fb5
add esp, 4
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
je 0x407945
mov eax, dword [ebp - 0x6b0]
jmp 0x407c9f
push 0x40ede0
lea ecx, [ebp - 0x410]
push ecx
call sub.MSVCRT.dll_wcscpy
add esp, 8
lea edx, [ebp - 0x6ac]
push edx
lea eax, [ebp - 0x410]
push eax
call sub.MSVCRT.dll_wcscat
add esp, 8
lea ecx, [ebp - 0x1a58]
push ecx
push 0x4093a0
lea edx, [ebp - 0x410]
push edx
call dword [0x40f4dc]
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
jge 0x40799c
jmp 0x407c9a
cmp dword [ebp + 0xc], 1
jne 0x4079ae
mov dword [ebp - 0x4a0], 0x1f
jmp 0x4079b8
mov dword [ebp - 0x4a0], 0x12
cmp dword [ebp + 0xc], 1
jne 0x4079f5
lea eax, [ebp - 0x49c]
push eax
mov ecx, dword [ebp - 0x4a0]
push ecx
push 0x40d790
mov edx, dword [ebp + 0x10]
add edx, 0x410
push edx
mov eax, dword [ebp - 0x1a58]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x1a58]
push edx
call dword [ecx + 0x18]
mov dword [ebp - 0x6b0], eax
jmp 0x407a2a
lea eax, [ebp - 0x49c]
push eax
mov ecx, dword [ebp - 0x4a0]
push ecx
push 0x40dd60
mov edx, dword [ebp + 0x10]
add edx, 0x410
push edx
mov eax, dword [ebp - 0x1a58]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x1a58]
push edx
call dword [ecx + 0x18]
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
jge 0x407a75
mov eax, dword [ebp - 0x6b0]
and eax, 0xffff
cmp eax, 0x1392
jne 0x407a70
mov ecx, dword [ebp - 0x1a58]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x1a58]
push eax
call dword [edx + 8]
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00407ca3
add esp, 0xc
jmp 0x407c9f
jmp 0x407c95
lea ecx, [ebp - 0x498]
push ecx
push 0x4091e0
mov edx, dword [ebp - 0x49c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x49c]
push ecx
call dword [eax]
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
jge 0x407aa6
jmp 0x407c90
push 0
push 1
mov edx, dword [ebp + 0x14]
push edx
push 0
push 0
push 0
push 0
push 0x10040000
mov eax, dword [ebp - 0x498]
push eax
call fcn.00404e0d
add esp, 0x24
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
je 0x407ade
jmp 0x407c8b
lea ecx, [ebp - 0x1850]
push ecx
mov edx, dword [ebp - 0x498]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x498]
push ecx
call dword [eax + 0x24]
mov dword [ebp - 0x6b0], eax
cmp dword [ebp - 0x6b0], 0
je 0x407b0b
jmp 0x407c86
cmp dword [ebp - 0x1850], 0
je 0x407b2a
mov edx, dword [ebp - 0x1850]
push edx
lea eax, [ebp - 0x47c]
push eax
call sub.MSVCRT.dll_wcscpy
add esp, 8
cmp dword [ebp - 0x1850], 0
je 0x407b40
mov ecx, dword [ebp - 0x1850]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x498], 0
je 0x407b5b
mov edx, dword [ebp - 0x498]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x498]
push ecx
call dword [eax + 8]
cmp dword [ebp - 0x49c], 0
je 0x407b76
mov edx, dword [ebp - 0x49c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x49c]
push ecx
call dword [eax + 8]
cmp dword [ebp - 0x1a58], 0
je 0x407b91
mov edx, dword [ebp - 0x1a58]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1a58]
push ecx
call dword [eax + 8]
cmp dword [ebp - 0x6b0], 0
je 0x407ba5
mov eax, dword [ebp - 0x6b0]
jmp 0x407c9f
mov dword [ebp - 0x1a54], 0
mov edx, dword [ebp + 0x10]
push edx
push 1
call fcn.00402b05
add esp, 8
lea eax, [ebp - 0x1a54]
push eax
push 2
push 0
mov ecx, dword [ebp + 0x10]
add ecx, 0x618
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x1a5c], eax
cmp dword [ebp - 0x1a5c], 0
je 0x407bf0
jmp 0x407c84
lea eax, [ebp - 0x47c]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 4
shl eax, 1
push eax
lea ecx, [ebp - 0x47c]
push ecx
push 1
push 0
push 0x40edf0
mov edx, dword [ebp - 0x1a54]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x1a5c], eax
cmp dword [ebp - 0x1a5c], 0
je 0x407c30
jmp 0x407c82
cmp dword [ebp + 0x14], 0
je 0x407c41
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1a74], eax
jmp 0x407c4b
mov dword [ebp - 0x1a74], str.LocalSystem
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1a74]
push edx
call fcn.00404d80
add esp, 8
mov dword [ebp - 0x1a5c], eax
cmp dword [ebp - 0x1a54], 0
je 0x407c7a
mov eax, dword [ebp - 0x1a54]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x1a5c]
jmp 0x407c9f
jmp 0x407c64
jmp 0x407c64
jmp 0x407b2a
jmp 0x407b2a
jmp 0x407b2a
jmp 0x407b2a
jmp 0x407b2a
mov esp, ebp
pop ebp
ret