Function at 0x4056e0
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x360
mov eax, dword [0x410060]
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 0x405749
cmp dword [ebp + 0xc], 0
jne 0x405753
mov eax, 0x80070057
jmp 0x40597d
push 0x80000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40577c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
jmp 0x405939
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x330]
push ecx
call fcn.00406d80
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 0x4057c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
jmp 0x405939
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 0x405939
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0x7a
je 0x405803
jmp 0x405939
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 0x40582d
mov dword [ebp - 0x21c], 0xe
jmp 0x405939
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 0x40585e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x21c], eax
jmp 0x405939
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.00402b80
test eax, eax
jge 0x405888
mov dword [ebp - 0x21c], 0x80004005
jmp 0x405939
mov edx, dword [ebp + 0xc]
push edx
push 0x104
lea eax, [ebp - 0x218]
push eax
call fcn.00402b80
test eax, eax
jge 0x4058b0
mov dword [ebp - 0x21c], 0x80004005
jmp 0x405939
push 0x5c
lea ecx, [ebp - 0x218]
push ecx
call fcn.00406d60
add esp, 8
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
je 0x4058db
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 0x40592f
movzx edx, word [ebp - 0x218]
cmp edx, 0x2e
je 0x405923
lea eax, [ebp - 0x360]
push eax
lea ecx, [ebp - 0x218]
push ecx
call sub.MSVCR71.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40592f
mov dword [ebp - 0x21c], 0x80004005
jmp 0x405939
mov dword [ebp - 0x21c], 0
cmp dword [ebp - 0x338], 0
je 0x405951
mov edx, dword [ebp - 0x338]
push edx
call sub.MSVCR71.dll_free
add esp, 4
cmp dword [ebp - 0x228], 0
je 0x405967
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x405977
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.00409559
mov esp, ebp
pop ebp
ret