Function at 0x499340
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a8c3a
push eax
mov eax, dword [0x507da4]
mov dword fs:[0], esp
sub esp, 0x2e4
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
je 0x499ac6
mov eax, dword [0x507da0]
cmp dword [eax - 8], ebx
je 0x499ac6
cmp dword [esp + 0x304], ebx
je 0x49983d
cmp dword [esp + 0x308], ebx
jle 0x49983d
mov ecx, 0x32
xor eax, eax
lea edi, [esp + 0x10c]
push 0xc7
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x110]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
mov ecx, 0x48
xor eax, eax
lea edi, [esp + 0x1d4]
lea edx, [esp + 0x40]
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 + 0x230]
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 + 0x40]
call sub.MFC42.DLL_CString::CString
lea edi, [esp + 0x10c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1fd]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, 0x4b3ce0
mov eax, ecx
mov esi, edi
mov edi, edx
push 0xfa000
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x38], ebp
and ecx, 3
mov dword [esp + 0x3c], ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x40], ebx
call sub.MFC42.DLL_operatornew
mov edi, eax
mov ecx, 0x3e800
xor eax, eax
mov dword [esp + 0x3c], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esp + 0x3c], 0xfa000
lea ecx, [esp + 0x34]
mov dword [esp + 0x2fc], ebx
push ecx
lea ecx, [esp + 0xb4]
call fcn.00498840
mov esi, 0x4b3cdc
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], 1
mov dword [esp + 0xb0], esi
call fcn.004992f0
mov byte [esp + 0x2fc], 2
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
push 0x19000
call sub.MFC42.DLL_operatornew
mov edi, eax
mov ecx, 0x6400
xor eax, eax
mov dword [esp + 0x20], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esp + 0x20], 0x19000
lea edx, [esp + 0x18]
lea ecx, [esp + 0x44]
push edx
call fcn.00498840
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 4
mov dword [esp + 0x44], esi
call fcn.004992f0
mov al, byte [esp + 0x30c]
mov byte [esp + 0x2fc], 5
cmp al, bl
mov eax, dword [esp + 0x80]
je 0x499524
cmp eax, ebx
je 0x49952e
mov dword [eax], ebx
jmp 0x49952e
cmp eax, ebx
je 0x49952e
mov dword [eax], 4
mov ebp, dword [esp + 0x308]
xor ecx, ecx
shl ebp, 4
cmp ebp, ebx
mov dword [esp + 0x24], 0x4b3ce0
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
jbe 0x499577
push ebp
call sub.MFC42.DLL_operatornew
mov ecx, ebp
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x2c], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x2c], ebp
mov edx, dword [esp + 0x304]
mov esi, dword [esp + 0x308]
mov edi, ecx
mov byte [esp + 0x2fc], 6
mov dword [esp + 0x40], edi
mov ax, word [edx]
add edx, 2
and eax, 0xffff
mov dword [ecx], eax
mov dword [ecx + 4], 1
add ecx, 0x10
dec esi
jne 0x499593
lea eax, [esp + 0x10]
test eax, eax
je 0x4995bb
cmp dword [esp + 0x10], ebx
jne 0x499637
lea ecx, [esp + 0x10]
push ecx
push ebp
push edi
lea ecx, [esp + 0x54]
call fcn.004984f0
cmp eax, 1
je 0x4995d9
cmp eax, 2
je 0x4995d9
xor cl, cl
jmp 0x4995db
mov cl, 1
cmp eax, ebx
je 0x499637
cmp cl, bl
je 0x499637
cmp eax, 1
jne 0x499627
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x5c]
call dword [edx + 0x28]
cmp eax, ebx
ja 0x499600
lea ecx, [esp + 0x44]
call fcn.00499190
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x48]
push eax
call fcn.00498710
push ebp
push edi
lea ecx, [esp + 0x4c]
call fcn.00499210
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x499649
mov dword [esp + 0x10], eax
jmp 0x499637
lea edx, [esp + 0x10]
test edx, edx
je 0x499649
mov dword [esp + 0x10], 0xffffffff
lea eax, [esp + 0x10]
test eax, eax
je 0x499649
cmp dword [esp + 0x10], ebx
jne 0x4996db
lea ecx, [esp + 0x10]
push ecx
push 0x4dc8f4
lea ecx, [esp + 0x50]
call fcn.004985f0
cmp eax, 1
je 0x49966a
cmp eax, 2
je 0x49966a
xor cl, cl
jmp 0x49966c
mov cl, 1
cmp eax, ebx
je 0x4996db
cmp cl, bl
je 0x4996db
cmp eax, 1
jne 0x4996cb
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x5c]
call dword [edx + 0x28]
cmp eax, ebx
ja 0x499691
lea ecx, [esp + 0x44]
call fcn.00499190
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x48]
push eax
call fcn.00498710
mov edi, 0x4dc8f4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x4dc8f4
lea ecx, [esp + 0x4c]
call fcn.00499210
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x4996ed
mov dword [esp + 0x10], eax
jmp 0x4996db
lea edx, [esp + 0x10]
test edx, edx
je 0x4996ed
mov dword [esp + 0x10], 0xffffffff
lea eax, [esp + 0x10]
test eax, eax
je 0x4996ed
cmp dword [esp + 0x10], ebx
jne 0x49977f
lea ecx, [esp + 0x10]
push ecx
push 0x4dc8f0
lea ecx, [esp + 0x50]
call fcn.004985f0
cmp eax, 1
je 0x49970e
cmp eax, 2
je 0x49970e
xor cl, cl
jmp 0x499710
mov cl, 1
cmp eax, ebx
je 0x49977f
cmp cl, bl
je 0x49977f
cmp eax, 1
jne 0x49976f
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x5c]
call dword [edx + 0x28]
cmp eax, ebx
ja 0x499735
lea ecx, [esp + 0x44]
call fcn.00499190
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x48]
push eax
call fcn.00498710
mov edi, 0x4dc8f0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x4dc8f0
lea ecx, [esp + 0x4c]
call fcn.00499210
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x49977f
mov dword [esp + 0x10], eax
jmp 0x49977f
lea edx, [esp + 0x10]
test edx, edx
je 0x49977f
mov dword [esp + 0x10], 0xffffffff
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1d4]
push eax
push pe_nt_image_headers32
push ecx
lea ecx, [esp + 0x50]
call fcn.00499010
cmp dword [esp + 0x10], ebx
je 0x499847
mov eax, dword [esp + 0x28]
mov esi, 0x4b3ce0
cmp eax, ebx
mov dword [esp + 0x24], esi
je 0x4997c2
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x28], ebx
mov edi, 0x4b3cdc
mov dword [esp + 0x44], edi
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 7
call fcn.00499c20
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 3
call fcn.00498c80
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], esi
cmp eax, ebx
je 0x499806
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x1c], ebx
mov dword [esp + 0xb0], edi
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], 8
call fcn.00499c20
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], bl
call fcn.00498c80
lea ecx, [esp + 0x34]
call fcn.004987d0
mov eax, 0xfffffffc
jmp 0x499ac9
mov eax, dword [0x507da0]
lea edx, [esp + 0x33]
push edx
push eax
lea ecx, [esp + 0xa8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov eax, dword [0x507da4]
lea ecx, [esp + 0xb0]
lea edx, [esp + 0x44]
push ecx
push edx
lea ecx, [esp + 0xa8]
push eax
push ecx
mov byte [esp + 0x30c], 9
call fcn.0049be50
add esp, 0x10
lea ecx, [esp + 0xa0]
mov esi, eax
mov byte [esp + 0x2fc], 6
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 0x4998ed
lea ecx, [esp + 0x24]
call fcn.004987d0
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 3
call fcn.004992c0
lea ecx, [esp + 0x18]
call fcn.004987d0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], bl
call fcn.004992c0
lea ecx, [esp + 0x34]
call fcn.004987d0
mov eax, esi
jmp 0x499ac9
mov esi, dword [esp + 0x40]
lea edx, [esp + 0x10]
push edx
push ebp
push esi
lea ecx, [esp + 0xbc]
mov dword [esp + 0x1c], ebx
call fcn.00499af0
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0xb8]
call fcn.00498da0
cmp dword [esp + 0x10], ebx
je 0x49997e
lea ecx, [esp + 0x14]
mov byte [esp + 0x2fc], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
call fcn.004987d0
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 3
call fcn.004992c0
lea ecx, [esp + 0x18]
call fcn.004987d0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], bl
call fcn.004992c0
lea ecx, [esp + 0x34]
call fcn.004987d0
mov eax, 0xfffffffb
jmp 0x499ac9
mov ecx, dword [esp + 0x304]
mov edx, dword [esp + 0x308]
lea eax, [esi + 8]
cmp byte [eax], bl
jne 0x499998
mov word [ecx], 0xffff
add eax, 0x10
add ecx, 2
dec edx
jne 0x49998f
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push str.SUCCESS
push edx
call esi
add esp, 8
test eax, eax
jne 0x499a11
lea ecx, [esp + 0x14]
mov byte [esp + 0x2fc], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
call fcn.004987d0
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 3
call fcn.004992c0
lea ecx, [esp + 0x18]
call fcn.004987d0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], bl
call fcn.004992c0
lea ecx, [esp + 0x34]
call fcn.004987d0
xor eax, eax
jmp 0x499ac9
mov eax, dword [esp + 0x14]
push str.FAILURE
push eax
call esi
add esp, 8
mov byte [esp + 0x2fc], 6
test eax, eax
lea ecx, [esp + 0x14]
jne 0x499a7b
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
call fcn.004987d0
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 3
call fcn.004992c0
lea ecx, [esp + 0x18]
call fcn.004987d0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], bl
call fcn.004992c0
lea ecx, [esp + 0x34]
call fcn.004987d0
mov eax, 0xfffffffe
jmp 0x499ac9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
call fcn.004987d0
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 3
call fcn.004992c0
lea ecx, [esp + 0x18]
call fcn.004987d0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x2fc], bl
call fcn.004992c0
lea ecx, [esp + 0x34]
call fcn.004987d0
mov eax, 0xfffffffa
jmp 0x499ac9
or eax, 0xffffffff
mov ecx, dword [esp + 0x2f4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2f0
ret