Function at 0x405080
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x360
mov eax, dword [0x40feb8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x224], 0
cmp dword [ebp + 8], 0
je 0x4050e9
cmp dword [ebp + 0xc], 0
jne 0x4050f3
mov eax, 0x80070057
jmp 0x40531d
push 0x80000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40511c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
jmp 0x4052d9
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x330]
push ecx
call fcn.00406760
add esp, 8
push 1
lea edx, [ebp - 0x330]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0
jne 0x405162
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
jmp 0x4052d9
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x220]
push edx
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x228]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4052d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0x7a
je 0x4051a3
jmp 0x4052d9
mov edx, dword [ebp - 4]
push edx
call sub.MSVCR71.dll_malloc
add esp, 4
mov dword [ebp - 0x338], eax
cmp dword [ebp - 0x338], 0
jne 0x4051cd
mov dword [ebp - 0x21c], 0xe
jmp 0x4052d9
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x338]
push edx
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4051fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
jmp 0x4052d9
mov ecx, dword [ebp - 0x338]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00402520
test eax, eax
jge 0x405228
mov dword [ebp - 0x21c], 0x80004005
jmp 0x4052d9
mov edx, dword [ebp + 0xc]
push edx
push 0x104
lea eax, [ebp - 0x218]
push eax
call fcn.00402520
test eax, eax
jge 0x405250
mov dword [ebp - 0x21c], 0x80004005
jmp 0x4052d9
push 0x5c
lea ecx, [ebp - 0x218]
push ecx
call fcn.00406740
add esp, 8
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
je 0x40527b
mov edx, dword [ebp - 0x224]
mov word [edx], 0
mov dword [ebp - 0x334], 0x10
lea eax, [ebp - 0x334]
push eax
lea ecx, [ebp - 0x360]
push ecx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x4052cf
movzx edx, word [ebp - 0x218]
cmp edx, 0x2e
je 0x4052c3
lea eax, [ebp - 0x360]
push eax
lea ecx, [ebp - 0x218]
push ecx
call sub.MSVCR71.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x4052cf
mov dword [ebp - 0x21c], 0x80004005
jmp 0x4052d9
mov dword [ebp - 0x21c], 0
cmp dword [ebp - 0x338], 0
je 0x4052f1
mov edx, dword [ebp - 0x338]
push edx
call sub.MSVCR71.dll_free
add esp, 4
cmp dword [ebp - 0x228], 0
je 0x405307
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x405317
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 0xc]
call fcn.00408ef1
mov esp, ebp
pop ebp
ret