Function at 0x407ad0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x40eb9d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd0c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x1c], ebp
lea eax, [esp + 0x38]
lea ecx, [esp + 0x788]
push eax
push 0x400
push ecx
lea edx, [esp + 0x494]
push 0x100
push edx
lea eax, [esp + 0x88]
push 0x14
push eax
lea edx, [esp + 0xd48]
sub esp, 0x10
mov dword [esp + 0xd50], 0
mov ecx, esp
mov dword [esp + 0x60], esp
push edx
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, ebp
call fcn.00407990
mov esi, str.HTTP
lea eax, [esp + 0x74]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x407b78
test cl, cl
je 0x407b74
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x407b78
add eax, 2
add esi, 2
test cl, cl
jne 0x407b50
xor eax, eax
jmp 0x407b7d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407b98
lea eax, [esp + 0xb88]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x407bbc
push 1
lea ecx, [esp + 0xd30]
mov dword [esp + 0xd28], 0xffffffff
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 eax, 1
jmp 0x40851d
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407c0b
mov ecx, dword [esp + 0x38]
mov word [esp + 0x64], 2
push ecx
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [esp + 0x488]
mov ecx, ebp
push edx
mov word [esp + 0x6a], ax
call fcn.004078f0
mov dword [esp + 0x68], eax
lea eax, [esp + 0x64]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x407c44
mov ecx, dword [esp + 0xd30]
test ecx, ecx
je 0x407c3a
mov al, byte [ecx - 1]
test al, al
je 0x407c30
cmp al, 0xff
je 0x407c30
dec al
mov byte [ecx - 1], al
mov eax, 1
jmp 0x40851d
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 1
jmp 0x40851d
mov al, byte [esp + 0x788]
test al, al
jne 0x407c67
push 0x400
lea ecx, [esp + 0x78c]
push 0x41363c
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [esp + 0xd40]
test eax, eax
jne 0x407c8d
push str.GET
push ebx
mov ecx, ebp
call fcn.00407910
lea edx, [esp + 0x88]
mov edi, str.GET
jmp 0x407ca6
push str.POST
push ebx
mov ecx, ebp
call fcn.00407910
lea edx, [esp + 0x88]
mov edi, str.POST
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 + 0x788]
push ecx
push ebx
mov ecx, ebp
call fcn.00407910
lea edi, [esp + 0x788]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str._HTTP_1.1_r_n
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00407910
mov edi, str._HTTP_1.1_r_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Accept:___r_n
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00407910
mov edi, str.Accept:___r_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push str.Accept_Language:_zh_cn_r_n
rep movsb byte es:[edi], byte [esi]
push ebx
mov ecx, ebp
call fcn.00407910
mov edi, str.Accept_Language:_zh_cn_r_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Accept_Encoding:_gzip__deflate_r_n
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00407910
mov edi, str.Accept_Encoding:_gzip__deflate_r_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.User_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1_.NET_CLR_2.0.50727__.NET4.0C__.NET4.0E__r_n
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00407910
mov edi, str.User_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1_.NET_CLR_2.0.50727__.NET4.0C__.NET4.0E__r_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0xd44]
mov ecx, edx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
je 0x407ea1
push eax
lea ecx, [esp + 0x58c]
push str.Content_Length:__ld_r_n
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x588]
mov ecx, ebp
push edx
push ebx
call fcn.00407910
lea edi, [esp + 0x588]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push str.Host:
push ebx
mov ecx, ebp
call fcn.00407910
mov edi, str.Host:
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x488]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
mov ecx, ebp
call fcn.00407910
lea edi, [esp + 0x488]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x413430
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00407910
mov edi, 0x413430
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0xd3c]
test edi, edi
je 0x407fa5
cmp byte [edi], 0
je 0x407fa5
push edi
push ebx
mov ecx, ebp
call fcn.00407910
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x88]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push str.Connection:_Keep_Alive
push ebx
mov ecx, ebp
call fcn.00407910
mov edi, str.Connection:_Keep_Alive
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str._r_n_r_n
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00407910
mov edi, str._r_n_r_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0xd40]
mov ecx, edx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
je 0x408048
mov esi, dword [esp + 0xd44]
test esi, esi
je 0x408048
push 0
mov edi, eax
push esi
push edi
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov byte [edi + esi], 0
lea edi, [esp + 0x88]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
shl ecx, 2
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
mov eax, dword [esp + 0xd4c]
lea edi, [esp + 0x8c]
or ecx, 0xffffffff
mov dword [eax], edx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 + 0x48]
push ecx
mov ecx, ebp
call fcn.00407800
xor edi, edi
xor esi, esi
push 0
lea edx, [esp + 0x58c]
push 1
push edx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4080f5
mov eax, dword [esp + 0x588]
cmp al, 0xa
je 0x4080ce
cmp al, 0xd
je 0x4080d9
inc edi
jmp 0x4080d9
test edi, edi
jne 0x4080d7
mov esi, 1
xor edi, edi
push eax
lea eax, [esp + 0x4c]
push eax
mov ecx, ebp
call fcn.00407860
test esi, esi
mov dword [esp + 0xd24], 0
je 0x4080a5
mov eax, dword [esp + 0xd48]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
push 0
mov dword [eax + 4], ecx
lea ecx, [esp + 0x24]
mov byte [edx], 0
mov esi, dword [eax + 4]
mov al, byte [esp + 0x37]
mov byte [esp + 0x24], 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
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], ecx
push ecx
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x408166
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov byte [ecx + eax], 0
mov edi, str.Content_Length:
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0xd24], 3
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push eax
push str.Content_Length:
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
test eax, eax
jbe 0x40843c
mov edi, str.Content_Length:
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], ecx
jne 0x4081bc
mov dword [esp + 0x18], eax
jmp 0x40823c
test edx, edx
jbe 0x40822d
mov eax, dword [esp + 0x18]
mov ebp, edx
cmp eax, ebp
ja 0x40822d
movsx ecx, byte [str.Content_Length:]
mov edx, 1
sub edx, eax
mov eax, dword [esp + 0x24]
add ebp, edx
mov dword [esp + 0x10], eax
push ebp
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x408229
mov ecx, dword [esp + 0x18]
mov edi, str.Content_Length:
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x408256
mov ecx, dword [esp + 0x10]
movsx edx, byte [str.Content_Length:]
sub ecx, eax
inc eax
mov dword [esp + 0x10], eax
lea ebp, [ecx + ebp - 1]
push ebp
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x4081f2
mov edx, dword [esp + 0x28]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
mov ebp, dword [esp + 0x1c]
mov edi, str.Content_Length:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], ecx
jne 0x408266
jmp 0x4082e2
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
sub eax, ecx
mov dword [esp + 0x18], eax
jmp 0x408238
test edx, edx
jbe 0x4082d7
mov eax, dword [esp + 0x10]
mov ebp, edx
cmp eax, ebp
ja 0x4082d7
movsx ecx, byte [str.Content_Length:]
mov edx, 1
sub edx, eax
mov eax, dword [esp + 0x24]
add ebp, edx
mov dword [esp + 0x14], eax
push ebp
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x4082d7
mov ecx, dword [esp + 0x10]
mov edi, str.Content_Length:
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x408343
mov ecx, dword [esp + 0x14]
movsx edx, byte [str.Content_Length:]
sub ecx, eax
inc eax
mov dword [esp + 0x14], eax
lea ebp, [ecx + ebp - 1]
push ebp
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x40829c
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [eax]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x18]
sub ecx, edi
add eax, 0x10
dec ecx
push ecx
lea ecx, [esp + 0x58]
push eax
push ecx
lea ecx, [esp + 0x2c]
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__::substr_unsigned_int__unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0xd24], 4
mov ecx, dword [edx]
push ecx
push 0
push eax
lea ecx, [esp + 0x2c]
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x58]
mov byte [esp + 0xd24], 3
test eax, eax
je 0x408352
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x408349
cmp al, 0xff
je 0x408349
dec al
mov byte [ecx], al
jmp 0x408352
sub eax, dword [esp + 0x24]
jmp 0x4082de
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov edi, 0x413734
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x14], ecx
je 0x4083e1
mov ebp, dword [esp + 0x28]
test ebp, ebp
jbe 0x4083d6
mov eax, dword [esp + 0x14]
cmp eax, ebp
ja 0x4083d6
movsx ecx, byte [0x413734]
mov edx, 1
sub edx, eax
mov eax, dword [esp + 0x24]
add ebp, edx
mov dword [esp + 0x10], eax
push ebp
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x4083d6
mov ecx, dword [esp + 0x14]
mov edi, 0x413734
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40842d
mov ecx, dword [esp + 0x10]
movsx edx, byte [0x413734]
sub ecx, eax
inc eax
mov dword [esp + 0x10], eax
lea ebp, [ecx + ebp - 1]
push ebp
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x40839f
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [eax]
mov ebp, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x58]
push 0
push ecx
lea ecx, [esp + 0x2c]
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__::substr_unsigned_int__unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0xd24], 5
mov ecx, dword [edx]
push ecx
push 0
push eax
lea ecx, [esp + 0x2c]
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x58]
test eax, eax
je 0x40843c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x408433
cmp al, 0xff
je 0x408433
dec al
mov byte [ecx], al
jmp 0x40843c
sub eax, dword [esp + 0x24]
jmp 0x4083dd
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea edx, [esp + 0x3c]
mov ecx, ebp
push edx
call fcn.00407800
xor esi, esi
xor edi, edi
lea eax, [esp + 0x588]
push edi
push 0x1ff
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
add esi, eax
cmp eax, edi
jle 0x40849f
lea ecx, [esp + 0x588]
push eax
lea edx, [esp + 0x40]
push ecx
push edx
mov ecx, ebp
mov byte [esp + eax + 0x594], 0
call fcn.00407890
mov eax, dword [esp + 0x24]
cmp eax, edi
jne 0x408491
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
cmp esi, eax
jne 0x40844a
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0xd48]
push ebx
mov byte [eax], 0
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [ecx + 8], eax
sub edx, eax
mov dword [ecx + 0xc], edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x24]
cmp ecx, edi
je 0x4084e8
mov al, byte [ecx - 1]
test al, al
je 0x4084de
cmp al, 0xff
je 0x4084de
dec al
mov byte [ecx - 1], al
jmp 0x4084e8
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0xd30]
mov dword [esp + 0x24], edi
cmp ecx, edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
je 0x40851b
mov al, byte [ecx - 1]
test al, al
je 0x408511
cmp al, 0xff
je 0x408511
dec al
mov byte [ecx - 1], al
jmp 0x40851b
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0xd1c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xd18
ret 0x20