Function at 0x499c40
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a8ca9
push eax
mov eax, dword [0x507da4]
mov dword fs:[0], esp
sub esp, 0x2d8
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
je 0x49a040
mov eax, dword [0x507da0]
cmp dword [eax - 8], ebx
je 0x49a040
mov ecx, 0x32
xor eax, eax
lea edi, [esp + 0x220]
push 0xc7
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x224]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
mov ecx, 0x48
xor eax, eax
lea edi, [esp + 0x100]
lea edx, [esp + 0x34]
rep stosd dword es:[edi], eax
push 0x32
push edx
mov ecx, 0x507d9c
call sub.MFC42.DLL_CString::Left
mov eax, dword [eax]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x15c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CString::CString
lea edi, [esp + 0x220]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x129]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0xfa000
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [esp + 0x30], ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x34], ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, 0x4b3ce0
mov dword [esp + 0x2c], esi
call sub.MFC42.DLL_operatornew
mov edi, eax
mov ecx, 0x3e800
xor eax, eax
mov dword [esp + 0x30], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esp + 0x30], 0xfa000
lea ecx, [esp + 0x28]
mov dword [esp + 0x2f0], ebx
push ecx
lea ecx, [esp + 0xa8]
call fcn.00498840
mov ebp, 0x4b3cdc
lea ecx, [esp + 0xa4]
mov byte [esp + 0x2f0], 1
mov dword [esp + 0xa4], ebp
mov byte [esp + 0xfc], 1
mov byte [esp + 0xfd], 1
call fcn.0049a060
mov byte [esp + 0x2f0], 2
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], esi
push 0x19000
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call sub.MFC42.DLL_operatornew
mov edi, eax
mov ecx, 0x6400
xor eax, eax
mov dword [esp + 0x24], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esp + 0x24], 0x19000
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x48]
push edx
call fcn.00498840
lea ecx, [esp + 0x48]
mov byte [esp + 0x2f0], 4
mov dword [esp + 0x48], ebp
call fcn.004992f0
mov eax, dword [esp + 0x84]
mov byte [esp + 0x2f0], 5
cmp eax, ebx
je 0x499e11
mov dword [eax], 3
lea eax, [esp + 0x10]
test eax, eax
je 0x499e23
cmp dword [esp + 0x10], ebx
jne 0x499eb5
lea ecx, [esp + 0x10]
lea edx, [esp + 0x100]
push ecx
push pe_nt_image_headers32
push edx
lea ecx, [esp + 0x58]
call fcn.004984f0
cmp eax, 1
je 0x499e4c
cmp eax, 2
je 0x499e4c
xor cl, cl
jmp 0x499e4e
mov cl, 1
cmp eax, ebx
je 0x499eb5
cmp cl, bl
je 0x499eb5
cmp eax, 1
jne 0x499ea5
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x60]
call dword [eax + 0x28]
cmp eax, ebx
ja 0x499e73
lea ecx, [esp + 0x48]
call fcn.00499190
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x50]
call fcn.00498710
lea edx, [esp + 0x100]
push pe_nt_image_headers32
push edx
lea ecx, [esp + 0x50]
call fcn.00499210
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x499eb5
mov dword [esp + 0x10], eax
jmp 0x499eb5
lea edx, [esp + 0x10]
test edx, edx
je 0x499eb5
mov dword [esp + 0x10], 0xffffffff
mov al, byte [esp + 0x1b]
mov esi, dword [0x507da0]
push ebx
lea ecx, [esp + 0x3c]
or ebp, 0xffffffff
mov byte [esp + 0x3c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x40]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov eax, dword [0x507da4]
lea ecx, [esp + 0xa4]
lea edx, [esp + 0x48]
push ecx
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
mov byte [esp + 0x300], 6
call fcn.0049be50
add esp, 0x10
lea ecx, [esp + 0x38]
mov esi, eax
mov byte [esp + 0x2f0], 5
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
cmp esi, ebx
je 0x499fa1
mov edi, 0x4b3cdc
lea ecx, [esp + 0x48]
mov byte [esp + 0x2f0], 3
mov dword [esp + 0x48], edi
call fcn.00499c20
lea ecx, [esp + 0x48]
call fcn.00498c80
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], 0x4b3ce0
cmp eax, ebx
je 0x499f6b
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x20], ebx
lea ecx, [esp + 0xa4]
mov byte [esp + 0x2f0], bl
mov dword [esp + 0xa4], edi
call fcn.00499c20
lea ecx, [esp + 0xa4]
call fcn.00498c80
lea ecx, [esp + 0x28]
call fcn.004987d0
mov eax, esi
jmp 0x49a043
lea edx, [esp + 0x14]
push ebx
push edx
lea ecx, [esp + 0xac]
call fcn.00498da0
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push str.SUCCESS
push eax
mov byte [esp + 0x2f8], 7
call esi
add esp, 8
test eax, eax
jne 0x499fd8
xor ebp, ebp
jmp 0x499ff0
mov ecx, dword [esp + 0x14]
push str.FAILURE
push ecx
call esi
add esp, 8
test eax, eax
jne 0x499ff0
mov ebp, 0xfffffffe
call fcn.0049c3d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2f0], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x48]
mov byte [esp + 0x2f0], 3
call fcn.004992c0
lea ecx, [esp + 0x1c]
call fcn.004987d0
lea ecx, [esp + 0xa4]
mov byte [esp + 0x2f0], bl
call fcn.004992c0
lea ecx, [esp + 0x28]
call fcn.004987d0
mov eax, ebp
jmp 0x49a043
or eax, 0xffffffff
mov ecx, dword [esp + 0x2e8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2e4
ret