Function at 0x45cf50
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
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
sub esp, 0x1bc
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov edi, 0x478924
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx + 0xe0], 0
mov ebp, dword [esp + 0x1d0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov dword [esp + 0x18], ecx
push ecx
mov ecx, ebp
mov dword [esp + 0x30], ebx
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 0x45cfb8
mov eax, dword [esp + 0x14]
mov edi, dword [ebp + 4]
mov ecx, eax
mov esi, 0x478924
mov edx, ecx
push eax
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, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov ecx, ebx
call fcn.0045b500
lea eax, [esp + 0x3c]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
jne 0x45cff8
pop edi
pop esi
pop ebp
mov eax, 0xffffff9c
pop ebx
add esp, 0x1bc
ret 4
push 0x50
mov word [esp + 0x30], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2e], ax
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x45d018
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.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x45d035
pop edi
pop esi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0x1bc
ret 4
mov ecx, dword [eax + 0xc]
push 0x10
mov edx, dword [ecx]
lea ecx, [esp + 0x30]
push ecx
push esi
mov eax, dword [edx]
mov dword [esp + 0x3c], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x45d065
pop edi
pop esi
pop ebp
mov eax, 0xffffff9b
pop ebx
add esp, 0x1bc
ret 4
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x84]
test eax, eax
mov dword [esp + 0x20], 0
jne 0x45d082
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]
mov edx, dword [esp + 0x18]
mov edi, dword [sym.imp.WS2_32.dll_send]
push 0
push ecx
push eax
push edx
call edi
mov esi, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
lea eax, [ebx + 0x48]
push str.POST
push eax
call esi
add esp, 8
test al, al
je 0x45d24a
lea ecx, [ebx + 0x58]
push str.multipart_form_data
push ecx
call esi
add esp, 8
test al, al
je 0x45d211
mov eax, dword [ebx + 0xb0]
mov ecx, dword [ebx + 0xb4]
cmp eax, ecx
mov dword [esp + 0x1c], eax
je 0x45d166
mov eax, dword [ebx + 0xe0]
test eax, eax
jne 0x45d1aa
mov edx, dword [esp + 0x1c]
push 0
mov esi, dword [edx]
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push eax
push ecx
push edx
call edi
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x45d13c
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x24]
sub eax, edx
xor edx, edx
imul eax, dword [esp + 0x20]
div dword [ebx + 0x78]
mov edx, dword [ebx + 0x20]
add eax, edx
mov edx, dword [ebx + 0x14]
push eax
mov eax, dword [ebx + 0x18]
push edx
push ecx
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [esi]
push ecx
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x24]
mov ecx, dword [ebx + 0xb4]
add eax, 4
add esp, 8
cmp eax, ecx
mov dword [esp + 0x1c], eax
jne 0x45d0dd
mov ecx, dword [ebx + 0xb4]
lea esi, [ebx + 0xac]
mov eax, ecx
mov ebx, dword [esi + 4]
cmp eax, ecx
je 0x45d189
mov edx, dword [eax]
add eax, 4
mov dword [ebx], edx
add ebx, 4
cmp eax, ecx
jne 0x45d17b
mov eax, dword [esi + 8]
mov ecx, esi
push eax
push ebx
call fcn.0045dd20
push 0
mov dword [esi + 8], ebx
mov esi, dword [esp + 0x1c]
push 2
push 0x47135c
jmp 0x45d23b
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edi, 0x478924
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebx + 0x7c]
mov ebp, ecx
mov ecx, edi
push ebp
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 0x45d1fb
mov edi, dword [edi + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x478924
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x80]
mov dword [ebx + 0x84], ebp
mov byte [eax + ebp], 0
pop edi
pop esi
mov dword [ebx + 0x78], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0x1bc
ret 4
mov esi, dword [esp + 0x18]
push 0
push 2
push 0x47135c
push esi
call edi
mov eax, dword [ebx + 0xd8]
mov ebx, dword [ebx + 0xd4]
test ebx, ebx
jne 0x45d237
mov ebx, 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 0
push eax
push ebx
push esi
call edi
push 0
push 2
push 0x47135c
push esi
call edi
mov edi, 0x478924
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x15], 1
mov ebx, ecx
mov ecx, ebp
push ebx
mov byte [esp + 0x1b], 0
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 0x45d296
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x478924
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x16]
push 1
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x45d2b3
mov byte [esp + 0x11], 0
mov al, byte [esp + 0x12]
cmp al, 0xa
jne 0x45d373
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x45d2cc
mov byte [esp + 0x11], 0
mov edi, 0x4711dc
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x1c], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x20], ecx
je 0x45d35d
mov ebx, dword [ebp + 8]
test ebx, ebx
jbe 0x45d356
mov eax, dword [esp + 0x20]
cmp eax, ebx
ja 0x45d356
movsx edx, byte [0x4711dc]
mov ecx, 1
sub ecx, eax
mov eax, dword [ebp + 4]
add ebx, ecx
mov dword [esp + 0x14], eax
push ebx
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x45d356
mov ecx, dword [esp + 0x20]
mov edi, 0x4711dc
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x45d36e
mov ecx, dword [esp + 0x14]
movsx edx, byte [0x4711dc]
sub ecx, eax
inc eax
mov dword [esp + 0x14], eax
lea ebx, [ebx + ecx - 1]
push ebx
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x45d31f
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 ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp eax, dword [ecx]
je 0x45d37b
mov byte [esp + 0x13], 1
jmp 0x45d37b
sub eax, dword [ebp + 4]
jmp 0x45d35d
cmp al, 0xd
je 0x45d37b
inc dword [esp + 0x1c]
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 bl, byte [esp + 0x12]
mov eax, dword [edx]
mov edx, dword [ebp + 8]
sub eax, edx
cmp eax, 1
ja 0x45d397
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edi, dword [ebp + 8]
push 0
inc edi
mov ecx, ebp
push edi
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 0x45d3c3
mov edx, dword [ebp + 4]
mov eax, dword [ebp + 8]
movsx ecx, bl
add edx, eax
mov ch, cl
mov byte [edx], cl
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], edi
mov byte [ecx + edi], 0
mov al, byte [esp + 0x11]
test al, al
jne 0x45d296
mov edi, 0x478924
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x28], 0
mov ebx, ecx
mov ecx, ebp
push ebx
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 0x45d419
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x478924
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov al, byte [esp + 0x13]
test al, al
je 0x45d687
mov esi, dword [sym.imp.WS2_32.dll_recv]
mov byte [esp + 0x11], 1
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x16]
push 1
push ecx
push edx
call esi
test eax, eax
jge 0x45d449
mov byte [esp + 0x11], 0
mov al, byte [esp + 0x12]
cmp al, 0xd
je 0x45d49a
cmp al, 0xa
je 0x45d4a2
mov edx, dword [ebp + 8]
mov bl, al
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]
sub ecx, edx
cmp ecx, 1
ja 0x45d46e
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edi, dword [ebp + 8]
push 0
inc edi
mov ecx, ebp
push edi
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 0x45d49a
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
movsx edx, bl
add eax, ecx
mov dh, dl
mov byte [eax], dl
mov edx, dword [ebp + 4]
mov dword [ebp + 8], edi
mov byte [edx + edi], 0
mov al, byte [esp + 0x11]
test al, al
jne 0x45d430
mov eax, dword [ebp + 4]
test eax, eax
jne 0x45d4ae
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]
lea ecx, [esp + 0x24]
push ecx
push 0x471160
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
mov edx, dword [esp + 0x30]
inc edx
push edx
call sub.MFC42.DLL_operatornew
mov esi, eax
mov eax, dword [esp + 0x34]
mov edi, esi
add esp, 0x10
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x18], esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
push eax
push esi
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebx
jae 0x45d51f
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x45d545
mov al, byte [ecx - 1]
test al, al
je 0x45d545
cmp al, 0xff
je 0x45d545
test ebx, ebx
jne 0x45d56b
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x45d599
test ebx, ebx
jne 0x45d555
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x45d599
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x45d561
cmp eax, ebx
jae 0x45d574
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov esi, dword [esp + 0x14]
mov edi, dword [ebp + 4]
mov ecx, ebx
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 eax, dword [ebp + 4]
mov esi, dword [esp + 0x14]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edi, 0x478924
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
cmp ebp, 0xfffffffd
jbe 0x45d5c4
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [esp + 0x28]
lea ebx, [ecx + 0x7c]
mov ecx, dword [ecx + 0x80]
test ecx, ecx
je 0x45d608
mov al, byte [ecx - 1]
test al, al
je 0x45d608
cmp al, 0xff
je 0x45d608
test ebp, ebp
jne 0x45d642
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
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 ecx, dword [esp + 0x28]
pop edi
pop esi
xor eax, eax
mov dword [ecx + 0x78], ebp
pop ebp
pop ebx
add esp, 0x1bc
ret 4
test ebp, ebp
jne 0x45d62c
push 1
mov ecx, ebx
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 ecx, dword [esp + 0x28]
pop edi
pop esi
xor eax, eax
mov dword [ecx + 0x78], ebp
pop ebp
pop ebx
add esp, 0x1bc
ret 4
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x45d638
cmp eax, ebp
jae 0x45d64b
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x478924
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x28]
mov dword [ebx + 8], ebp
pop edi
mov byte [eax + ebp], 0
pop esi
pop ebp
mov dword [ecx + 0x78], 0
xor eax, eax
pop ebx
add esp, 0x1bc
ret 4
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0x1bc
ret 4