Function at 0x401940
Capabilities:
Get hostname

Disassembly:
sub esp, 0x8c
push ebp
push esi
push edi
or ebp, 0xffffffff
mov dword [esp + 0x10], 0x406550
mov dword [esp + 0x14], 0
call fcn.00401d10
push 0
call fcn.00401e20
add esp, 4
lea eax, [esp + 0x18]
push 0x3f
push eax
call sub.WSOCK32.dll_gethostname
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x57], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x18]
mov edx, ecx
mov esi, edi
mov edi, 0x406e40
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x5c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x4060e8]
push ecx
push 0x406548
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
mov edi, 1
mov dword [0x4069ec], edi
push 0
call sub.libwpwr.dll_wpwrSigEnableSet
mov eax, dword [0x4069ec]
mov ecx, dword [0x4069e8]
add esp, 4
lea edx, [esp + 0x58]
push eax
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call sub.libwpwr.dll_wpwrInit
add esp, 0x10
push 0
call sub.WINRPC32.dll_Ordinal_129
add esp, 4
call sub.libwpwr.dll_wpwrLogHeaderSet
push 0x406510
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
mov dword [0x4069dc], edi
push 0x4064ec
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
lea ecx, [esp + 0x18]
push ecx
call fcn.00403630
add esp, 4
test eax, eax
je 0x401a82
mov eax, dword [0x4069ec]
test eax, eax
jne 0x401a52
push edi
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x4064ec
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
push 0x4069f8
push 0x4064b0
call sub.libwpwr.dll_wpwrLogErr
add esp, 8
xor eax, eax
test ebp, ebp
sete al
pop edi
pop esi
pop ebp
add esp, 0x8c
ret
lea edx, [esp + 0xc]
push edx
call sub.wtxapi.dll_wtxInitialize
add esp, 4
cmp eax, 0xffffffff
jne 0x401ade
mov eax, dword [0x4069ec]
test eax, eax
jne 0x401ab3
push edi
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x4064ec
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
push 0x406494
call sub.libwpwr.dll_wpwrLogErr
add esp, 4
xor eax, eax
test ebp, ebp
sete al
pop edi
pop esi
pop ebp
add esp, 0x8c
ret
mov eax, dword [esp + 0xc]
push eax
call sub.wtxapi.dll_wtxProbe
add esp, 4
test eax, eax
jne 0x401b66
push 0x406050
call sub.libwpwr.dll_wpwrGetEnv
mov esi, eax
add esp, 4
test esi, esi
jne 0x401b1b
push 0x406e40
call dword [sym.imp.MSVCRT.dll__strdup]
mov esi, eax
add esp, 4
test esi, esi
jne 0x401b1b
mov esi, 0x406488
mov eax, dword [0x4069ec]
test eax, eax
jne 0x401b3a
push edi
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x4064ec
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
push esi
push 0x406454
call sub.libwpwr.dll_wpwrLogErr
add esp, 8
xor eax, eax
test ebp, ebp
sete al
pop edi
pop esi
pop ebp
add esp, 0x8c
ret
mov ecx, dword [0x4069f0]
push ecx
call section..text
add esp, 4
lea edx, [esp + 0x58]
push eax
push 0x406448
push edx
call fcn.00401d60
add esp, 0xc
test eax, eax
je 0x401be8
mov eax, dword [0x4069ec]
test eax, eax
jne 0x401bab
push edi
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x4064ec
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
lea eax, [esp + 0x58]
push eax
push 0x406420
call sub.libwpwr.dll_wpwrLogErr
mov ecx, dword [esp + 0x14]
add esp, 8
push ecx
call sub.wtxapi.dll_wtxTerminate
add esp, 4
xor eax, eax
test ebp, ebp
sete al
pop edi
pop esi
pop ebp
add esp, 0x8c
ret
push 0x406414
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
call fcn.00402eb0
test eax, eax
je 0x401c1c
mov edx, dword [esp + 0xc]
push edx
call sub.wtxapi.dll_wtxTerminate
add esp, 4
xor eax, eax
test ebp, ebp
sete al
pop edi
pop esi
pop ebp
add esp, 0x8c
ret
push 0x4063ec
call sub.libwpwr.dll_wpwrLogMsg
mov eax, dword [esp + 0x10]
add esp, 4
push eax
call sub.wtxapi.dll_wtxTerminate
add esp, 4
push 0
push fcn.00401cd0
call sub.libwpwr.dll_wpwrSigHookAdd
add esp, 8
push 0
push fcn.00401cd0
call sub.libwpwr.dll_wpwrShutdownHookAdd
add esp, 8
mov dword [0x4069dc], 0
push 0x406414
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
xor ebp, ebp
xor eax, eax
test ebp, ebp
pop edi
pop esi
sete al
pop ebp
add esp, 0x8c
ret