Function at 0x401800
Capabilities:
Connect socket
Create process on windows
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405b4d
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1310
call fcn.00405a80
mov eax, dword [0x40a008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x12f0]
mov dword [ebp - 0x12fc], 0
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401895
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.WSAStartup_failed:
push 0x4044e0
push eax
call fcn.004042c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov eax, 1
jmp 0x4020c1
lea eax, [ebp - 0x12f4]
mov dword [ebp - 0x12f4], 0
push eax
lea eax, [ebp - 0x10b0]
mov dword [ebp - 0x10b0], 0
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x10ac], 0
push 0x40771c
push str.9966.bio
movlpd qword [ebp - 0x10a0], xmm0
movlpd qword [ebp - 0x1098], xmm0
mov dword [ebp - 0x10a8], 1
mov dword [ebp - 0x10a4], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x401932
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.getaddrinfo_failed:
push 0x4044e0
push eax
call fcn.004042c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x4020c1
mov esi, dword [ebp - 0x12f4]
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [ebp - 0x12f8], edi
cmp edi, 0xffffffff
jne 0x40199c
push 0x4044e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.socket_failed:
push eax
call fcn.004042c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [ebp - 0x12f4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x4020c1
push dword [esi + 0x10]
push dword [esi + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4019df
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebp - 0x12f4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
push 0x4044e0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Unable_to_connect_to_server_
call fcn.004042c0
add esp, 4
jmp 0x40191a
push dword [ebp - 0x12f4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
push 0x3c
xorps xmm0, xmm0
mov dword [ebp - 0x1068], 0
push str.GET__update__HTTP_1.1_r_nHost:_9966.bio_r_nConnection:_close_r_n_r_n
lea ecx, [ebp - 0x1078]
mov dword [ebp - 0x1064], 0
movups xmmword [ebp - 0x1078], xmm0
call fcn.00404890
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1078]
cmp dword [ebp - 0x1064], 0x10
push 0
push dword [ebp - 0x1068]
cmovae eax, dword [ebp - 0x1078]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x401a8e
push 0x4044e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.send_failed:
push eax
call fcn.004042c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edi, 1
jmp 0x402083
xorps xmm0, xmm0
mov dword [ebp - 0x1020], 0
mov esi, 0xf
movups xmmword [ebp - 0x1030], xmm0
mov dword [ebp - 0x101c], esi
mov byte [ebp - 0x1030], 0
push 0
push 0x1000
lea eax, [ebp - 0x1018]
mov byte [ebp - 4], 1
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jle 0x401b71
mov eax, dword [ebp - 0x12f8]
xor ecx, ecx
mov dword [ebp - 0x12f8], eax
mov eax, esi
sub eax, ecx
push edi
cmp edi, eax
ja 0x401b20
lea eax, [ecx + edi]
cmp esi, 0x10
mov dword [ebp - 0x1020], eax
lea eax, [ebp - 0x1030]
cmovae eax, dword [ebp - 0x1030]
lea esi, [eax + ecx]
lea eax, [ebp - 0x1018]
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x401b40
lea eax, [ebp - 0x1018]
mov byte [ebp - 0x12fc], 0
push eax
push dword [ebp - 0x12fc]
lea ecx, [ebp - 0x1030]
push edi
call fcn.00404730
push 0
push 0x1000
lea eax, [ebp - 0x1018]
push eax
push dword [ebp - 0x12f8]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, dword [ebp - 0x101c]
mov edi, eax
test edi, edi
jle 0x401b71
mov ecx, dword [ebp - 0x1020]
jmp 0x401ae5
jne 0x402010
lea eax, [ebp - 0x1030]
push eax
lea ecx, [ebp - 0x1048]
call fcn.00403e80
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1060]
push 0x12
xorps xmm0, xmm0
mov dword [ebp - 0x1050], 0
push str.Asst4Stu_Version:
movups xmmword [ebp - 0x1060], xmm0
mov dword [ebp - 0x104c], 0
call fcn.00404890
xorps xmm0, xmm0
mov dword [ebp - 0x1080], 0
movups xmmword [ebp - 0x1090], xmm0
mov dword [ebp - 0x107c], 0xf
mov byte [ebp - 0x1090], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x1060]
cmp dword [ebp - 0x104c], 0x10
lea ecx, [ebp - 0x1048]
mov esi, dword [ebp - 0x1060]
push dword [ebp - 0x1050]
mov edi, dword [ebp - 0x1038]
cmovae eax, esi
cmp dword [ebp - 0x1034], 0x10
mov edx, edi
push eax
cmovae ecx, dword [ebp - 0x1048]
push ecx
call fcn.00404640
add esp, 0xc
mov dword [ebp - 0x12fc], eax
cmp eax, 0xffffffff
je 0x401ec7
push 0xb0
lea eax, [ebp - 0x1160]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edx, dword [ebp - 0x1050]
add esp, 0xc
add edx, dword [ebp - 0x12fc]
xorps xmm0, xmm0
mov dword [ebp - 0x1308], 0
mov dword [ebp - 0x1304], 0
movups xmmword [ebp - 0x1318], xmm0
cmp edi, edx
jb 0x4020df
sub edi, edx
lea eax, [ebp - 0x1048]
or ecx, 0xffffffff
cmp edi, 0xffffffff
cmovb ecx, edi
cmp dword [ebp - 0x1034], 0x10
push ecx
cmovae eax, dword [ebp - 0x1048]
lea ecx, [ebp - 0x1318]
add eax, edx
push eax
call fcn.00404890
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10f8]
mov dword [ebp - 0x1160], 0x407a30
mov dword [ebp - 0x1150], 0x4079e0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
lea eax, [ebp - 0x1148]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x1160]
mov dword [ebp - 0x12fc], 3
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char____]
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x1160]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0x1160]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1164], eax
lea eax, [ebp - 0x1148]
mov ecx, eax
mov dword [ebp - 0x131c], eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1318]
mov eax, dword [ebp - 0x1304]
cmp eax, 0x10
mov edx, dword [ebp - 0x1318]
mov edi, dword [ebp - 0x1308]
cmovae ecx, edx
mov dword [ebp - 0x1300], ecx
xor ecx, ecx
mov dword [ebp - method.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
cmp edi, 0x7fffffff
jbe 0x401d78
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_alloc_void_]
test edi, edi
je 0x401e24
cmp edi, 0x1000
jb 0x401daf
lea eax, [edi + 0x23]
cmp eax, edi
jbe 0x4020e4
push eax
call fcn.00404d1d
add esp, 4
test eax, eax
je 0x401e56
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x401dba
push edi
call fcn.00404d1d
add esp, 4
mov esi, eax
push edi
push dword [ebp - 0x1300]
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x113c]
lea ecx, [edi + esi]
mov dword [ebp - 0x1110], ecx
add esp, 0xc
mov edx, dword [ebp - 0x1318]
mov dword [eax], esi
mov eax, dword [ebp - 0x112c]
mov dword [eax], esi
mov eax, dword [ebp - 0x111c]
mov dword [eax], edi
mov eax, dword [ebp - 0x1138]
mov ecx, dword [ebp - 0x1110]
sub ecx, esi
mov dword [eax], esi
mov eax, dword [ebp - 0x1128]
mov dword [eax], esi
mov eax, dword [ebp - 0x1118]
mov esi, dword [ebp - 0x1060]
mov dword [eax], ecx
mov ecx, 1
mov eax, dword [ebp - 0x1304]
jmp 0x401e2a
mov dword [ebp - 0x1110], ecx
mov dword [ebp - 0x110c], ecx
mov byte [ebp - 4], 0xa
cmp eax, 0x10
jb 0x401e66
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x401e5c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401e5c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404f9e
add esp, 8
push ecx
lea edx, [ebp - 0x1090]
lea ecx, [ebp - 0x1160]
call fcn.00404ad0
mov eax, dword [ebp - 0x1160]
add esp, 4
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0x1160]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1164], eax
lea ecx, [ebp - 0x1148]
call fcn.00403cd0
lea ecx, [ebp - 0x1140]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x10f8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
jmp 0x401ee8
push 0x4044e0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Prefix_not_found.
call fcn.004042c0
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, 0x40a748
lea ecx, [ebp - 0x1090]
call fcn.00404510
test al, al
je 0x401f03
mov edi, 0xa
jmp 0x401f43
push 0
push 0x407468
push 0x407458
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
push 0
push 0
push str.http:__9966.bio
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push dword [ebp - 0x12f8]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor edi, edi
mov ecx, dword [ebp - 0x107c]
cmp ecx, 0x10
jb 0x401f7d
mov edx, dword [ebp - 0x1090]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401f73
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4020af
push ecx
push edx
call fcn.00404f9e
add esp, 8
mov eax, dword [ebp - 0x104c]
cmp eax, 0x10
jb 0x401fb3
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x401fa9
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4020af
push ecx
push esi
call fcn.00404f9e
add esp, 8
mov ecx, dword [ebp - 0x1034]
cmp ecx, 0x10
jb 0x401fed
mov edx, dword [ebp - 0x1048]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401fe3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4020af
push ecx
push edx
call fcn.00404f9e
add esp, 8
mov esi, dword [ebp - 0x101c]
mov dword [ebp - 0x1038], 0
mov dword [ebp - 0x1034], 0xf
mov byte [ebp - 0x1048], 0
jmp 0x402053
push 0x4044e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.recv_failed:
push eax
call fcn.004042c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [ebp - 0x12f8]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edi, 1
cmp esi, 0x10
jb 0x402083
mov ecx, dword [ebp - 0x1030]
inc esi
mov eax, ecx
cmp esi, 0x1000
jb 0x402079
mov ecx, dword [eax - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4020af
push esi
push ecx
call fcn.00404f9e
add esp, 8
mov ecx, dword [ebp - 0x1064]
cmp ecx, 0x10
jb 0x4020bf
mov edx, dword [ebp - 0x1078]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4020b5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4020b5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404f9e
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00404d0f
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004040d0
call fcn.00401330
int3