Function at 0x40d690
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe9c
mov eax, dword [0x4545c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0xe94], edx
lea edx, [ebp - 0x7a8]
mov dword [ebp - 0xe84], ecx
push edx
add ecx, 0x50
mov dword [ebp - 0xe9c], eax
xor eax, eax
push ecx
push eax
mov word [ebp - 0x7a8], ax
mov dword [ebp - 0x7a6], eax
mov dword [ebp - 0x7a2], eax
mov dword [ebp - 0x79e], eax
mov word [ebp - 0x79a], ax
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
xor eax, eax
mov dword [ebp - 0xe90], eax
mov dword [ebp - 0xe8c], eax
lea eax, [ebp - 0xe90]
push eax
lea ecx, [ebp - 0x7a8]
push ecx
xor edi, edi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40d72c
mov ebx, dword [ebp - 0xe8c]
xor eax, eax
add edi, dword [ebp - 0xe90]
adc ebx, eax
cmp ebx, dword [esi + 4]
jb 0x40dca1
ja 0x40d73f
cmp edi, dword [esi]
jbe 0x40dca1
xor ecx, ecx
push 0x7e
push ecx
lea edx, [ebp - 0x86]
push edx
mov dword [esi], edi
mov dword [esi + 4], ebx
mov dword [ebp - 0xe98], 0x3c
mov word [ebp - 0x88], cx
call fcn.0042c9e0
add esp, 0xc
xor eax, eax
jmp 0x40d770
movzx ecx, word [eax + 0x44d36c]
mov word [ebp + eax - 0x88], cx
add eax, 2
test cx, cx
jne 0x40d770
lea eax, [ebp - 0x88]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d790
sub eax, edx
sar eax, 1
lea ecx, [ebp - 0xe98]
push ecx
lea edx, [ebp + eax*2 - 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea eax, [ebp - 0x88]
xor esi, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d7c0
sub eax, edx
sar eax, 1
je 0x40d807
movzx eax, word [ebp + esi*2 - 0x88]
push eax
call fcn.0042509e
mov word [ebp + esi*2 - 0x88], ax
lea eax, [ebp - 0x88]
add esp, 4
inc esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d7f4
sub eax, edx
sar eax, 1
cmp esi, eax
jb 0x40d7d1
mov edi, dword [ebp - 0xe84]
mov eax, dword [edi + 8]
mov edx, eax
lea ecx, [ebp - 0x88]
mov si, word [ecx]
cmp si, word [edx]
jne 0x40d83e
test si, si
je 0x40d83a
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x40d83e
add ecx, 4
add edx, 4
test si, si
jne 0x40d818
xor ecx, ecx
jmp 0x40d843
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
je 0x40d88f
mov edx, eax
lea ecx, [ebp - 0x84]
nop
mov si, word [ecx]
cmp si, word [edx]
jne 0x40d876
test si, si
je 0x40d872
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x40d876
add ecx, 4
add edx, 4
test si, si
jne 0x40d850
xor ecx, ecx
jmp 0x40d87b
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
je 0x40d88f
call fcn.0040d480
cmp eax, 0x100
je 0x40dca1
push 0x6d8
lea ecx, [ebp - 0xe80]
push 0
push ecx
call fcn.0042c9e0
mov edx, dword [edi + 0xc]
mov eax, edx
add esp, 0xc
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d8b0
sub eax, esi
sar eax, 1
cmp eax, 0x1f
ja 0x40d8cf
push eax
push edx
lea edx, [ebp - 0xe80]
push edx
jmp 0x40d8d9
push 0x1f
push edx
lea eax, [ebp - 0xe80]
push eax
call fcn.004250b1
mov ebx, dword [edi + 8]
add esp, 0xc
test ebx, ebx
je 0x40d976
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d8f1
sub eax, edx
sar eax, 1
je 0x40d976
mov ecx, edi
mov edi, dword [ecx + 4]
test edi, edi
je 0x40d976
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d914
sub eax, edx
sar eax, 1
je 0x40d976
mov eax, ebx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d930
sub eax, edx
mov ecx, edi
sar eax, 1
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40d944
sub ecx, esi
sar ecx, 1
lea edx, [ecx + eax + 2]
cmp edx, 0x80
jae 0x40d976
push edi
push ebx
lea eax, [ebp - 0xe40]
push 0x44ca9c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0xe40]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d980
mov edi, dword [ebp - 0xe84]
sub eax, edx
sar eax, 1
jne 0x40d9f1
mov edx, dword [edi + 4]
test edx, edx
je 0x40d9f1
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d9a3
sub eax, esi
sar eax, 1
je 0x40d9f1
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d9c0
sub eax, esi
sar eax, 1
cmp eax, 0x7f
ja 0x40d9df
push eax
push edx
lea ecx, [ebp - 0xe40]
push ecx
jmp 0x40d9e9
push 0x7f
push edx
lea edx, [ebp - 0xe40]
push edx
call fcn.004250b1
add esp, 0xc
mov edx, dword [edi + 0x24]
test edx, edx
je 0x40da47
mov eax, edx
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40da00
sub eax, esi
sar eax, 1
je 0x40da47
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40da16
sub eax, esi
sar eax, 1
cmp eax, 0x7f
ja 0x40da35
push eax
push edx
lea eax, [ebp - 0xd40]
push eax
jmp 0x40da3f
push 0x7f
push edx
lea ecx, [ebp - 0xd40]
push ecx
call fcn.004250b1
add esp, 0xc
mov edx, dword [edi + 0x10]
mov eax, edx
lea esi, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40da50
sub eax, esi
sar eax, 1
cmp eax, 0x103
ja 0x40da71
push eax
push edx
lea edx, [ebp - 0xc40]
push edx
jmp 0x40da7e
push 0x103
push edx
lea eax, [ebp - 0xc40]
push eax
call fcn.004250b1
mov ecx, dword [edi + 0x48]
mov edx, dword [edi + 0x28]
mov dword [ebp - 0x7b0], ecx
movsx eax, word [edx + 0x56]
add esp, 0xc
mov dword [ebp - 0x7ac], eax
test eax, eax
jne 0x40daaa
mov dword [ebp - 0x7ac], 1
test ecx, ecx
jne 0x40dab8
mov dword [ebp - 0x7b0], 1
mov esi, dword [ebp - 0xe9c]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dac3
sub eax, edx
sar eax, 1
cmp eax, 0x103
ja 0x40dae4
push eax
push esi
lea eax, [ebp - 0xa38]
push eax
jmp 0x40daf1
push 0x103
push esi
lea ecx, [ebp - 0xa38]
push ecx
call fcn.004250b1
mov esi, dword [ebp - 0xe94]
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40db04
sub eax, edx
sar eax, 1
cmp eax, 0x3f
ja 0x40db23
push eax
push esi
lea edx, [ebp - 0x830]
push edx
jmp 0x40db2d
push 0x3f
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.004250b1
add esp, 0xc
xor ecx, ecx
push 0x70e
push ecx
lea edx, [ebp - 0x796]
push edx
mov word [ebp - 0x798], cx
call fcn.0042c9e0
add esp, 0xc
lea eax, [ebp - 0x830]
push eax
mov eax, dword [ebp - 0x7ac]
lea ecx, [ebp - 0xa38]
push ecx
mov ecx, dword [ebp - 0x7b0]
lea edx, [ebp - 0xd40]
push edx
push eax
push ecx
lea edx, [ebp - 0xc40]
push edx
lea eax, [ebp - 0xe40]
push eax
lea ecx, [ebp - 0xe80]
push ecx
lea edx, [ebp - 0x798]
push str._s_t_s_t_s_t_d_t_d_t_s_t_s_t_s_t
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x798]
add esp, 0x28
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dbb0
sub eax, edx
lea edx, [ebp - 0xe88]
sar eax, 1
mov ecx, 1
push edx
mov word [ebp + eax*2 - 0x798], cx
mov dword [ebp - 0xe88], 0
call dword [0x457560]
mov eax, dword [ebp - 0xe88]
mov dword [eax + 0x30], 3
mov ecx, dword [ebp - 0xe88]
lea eax, [ebp - 0x798]
add esp, 4
mov dword [ecx + 0x34], 0x20a
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40dc10
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
push edx
lea eax, [ebp - 0x798]
push eax
lea ecx, [ebp - 0xe88]
push ecx
call dword [0x457594]
mov edx, dword [ebp - 0xe88]
lea eax, [ebp - 0xe84]
add esp, 0xc
push eax
mov dword [ebp - 0xe84], edx
call dword [0x457584]
mov ecx, dword [ebp - 0xe84]
mov edx, dword [ecx + 0x48]
mov eax, 0x2e
mov word [edx], ax
mov ecx, dword [ebp - 0xe84]
mov eax, dword [ecx + 0x48]
add esp, 4
mov edx, str.wmcPipeSystem7
add eax, 0x20
mov cl, byte [edx]
mov byte [eax], cl
inc edx
inc eax
test cl, cl
jne 0x40dc78
mov edx, dword [ebp - 0xe84]
push edx
call fcn.00415a50
lea eax, [ebp - 0xe88]
add esp, 4
push eax
call dword [0x457564]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004243bb
mov esp, ebp
pop ebp
ret