Function at 0x10002000
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0xb4
push ebx
push ebp
push esi
push edi
call fcn.100065c9
push eax
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2
xor esi, esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], esi
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 0x44]
push 0x80
push eax
call sub.WSOCK32.dll_gethostname
test eax, eax
jne 0x10002298
lea ecx, [esp + 0x44]
push ecx
call sub.WSOCK32.dll_gethostbyname
cmp eax, esi
mov dword [esp + 0x1c], eax
je 0x10002298
mov dword [esp + 0x20], esi
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x20]
cmp dword [edx + eax], 0
je 0x1000221e
push 0x1000b6d8
lea ecx, [esp + 0x14]
call fcn.10006168
xor esi, esi
xor edi, edi
mov ecx, dword [esp + 0x1c]
xor ebx, ebx
xor ebp, ebp
cmp word [ecx + 0xa], si
jle 0x1000218e
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
test esi, esi
jle 0x100020ad
push 0x1000b1e0
lea ecx, [esp + 0x14]
call fcn.10006270
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov eax, dword [edx + 0xc]
mov edx, dword [eax + ecx]
xor eax, eax
test esi, esi
mov al, byte [edx + esi]
jne 0x100020fa
xor ecx, ecx
cmp eax, 0xa
sete cl
mov ebp, ecx
test ebp, ebp
jne 0x10002185
xor ebx, ebx
cmp eax, 0xac
sete bl
xor edx, edx
cmp eax, 0xc0
sete dl
cmp eax, 0xa9
mov edi, edx
sete cl
mov dword [esp + 0x18], ecx
jmp 0x10002133
cmp esi, 1
jne 0x10002133
test ebx, ebx
je 0x1000210d
cmp eax, 0x10
jb 0x1000210d
cmp eax, 0x1f
jbe 0x1000216f
xor ebx, ebx
test edi, edi
je 0x1000211a
cmp eax, 0xa8
je 0x10002176
mov ecx, dword [esp + 0x18]
xor edi, edi
test ecx, ecx
je 0x1000212b
cmp eax, 0xfe
je 0x1000217d
mov dword [esp + 0x18], 0
push eax
lea edx, [esp + 0x18]
push 0x1000b1dc
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
inc esi
movsx edx, word [ecx + 0xa]
cmp esi, edx
jge 0x1000218e
jmp 0x10002092
mov ebx, 1
jmp 0x10002185
mov edi, 1
jmp 0x10002185
mov dword [esp + 0x18], 1
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x100021a8
test ebp, ebp
jne 0x100021a8
test ebx, ebx
jne 0x100021a8
test edi, edi
jne 0x100021a8
mov dword [esp + 0x24], edi
jmp 0x100021bc
test ebp, ebp
mov dword [esp + 0x24], 1
jne 0x100021e6
test ebx, ebx
jne 0x100021e6
test edi, edi
jne 0x100021e6
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x100021e6
mov eax, dword [esp + 0x10]
push str.127.0.0.1
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x100021e6
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x100021fa
mov eax, dword [esp + 0x20]
add eax, 4
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
jmp 0x1000205d
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
pop edi
pop esi
mov dword [edx + 4], eax
pop ebp
mov eax, 1
pop ebx
add esp, 0xb4
ret
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10002298
push 0
call sub.MFC42.DLL_AfxSocketInit
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CSocket::CSocket
mov esi, 1
push 0
push 0x3f
push esi
push 0
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CAsyncSocket::Create
test eax, eax
je 0x1000226c
push 0x50
push str.www.sina.com.cn
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CAsyncSocket::Connect
test eax, eax
jne 0x1000226e
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CSocket::Close
xor esi, esi
lea ecx, [esp + 0x30]
call fcn.10006252
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword [ecx + 4], edx
pop ebx
add esp, 0xb4
ret
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov dword [eax + 4], ecx
pop ebp
xor eax, eax
pop ebx
add esp, 0xb4
ret