Function at 0x404280
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x406658
mov eax, dword fs:[0]
push eax
sub esp, 0x38c
mov eax, dword [0x40a018]
xor eax, esp
mov dword [esp + 0x388], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40a018]
xor eax, esp
push eax
lea eax, [esp + 0x3a0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3bc]
mov ebp, dword [esp + 0x3b0]
push 1
mov edi, edx
mov dword [esp + 0x34], ecx
xor ebx, ebx
push 3
lea ecx, [esp + 0x5c]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x20], ebx
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_int_]
mov dword [esp + 0x3a8], ebx
mov dword [esp + 0x20], 1
lea ebx, [ebx]
mov edx, dword [edi + 0x88]
lea esi, [edi + 8]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x80], 0xffffffff
movzx eax, word [ebp + 8]
mov ecx, dword [ebp + 4]
push esi
call fcn.00404bd0
add esp, 4
test al, al
je 0x404964
movzx eax, word [esi]
push ebx
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x88], eax
cmp eax, 0xffffffff
je 0x404964
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
cmp word [esi], 2
mov eax, 0x80
jne 0x404368
mov eax, 0x10
push eax
mov eax, dword [edi + 0x88]
push esi
call fcn.00404d00
add esp, 8
test eax, eax
jl 0x404964
push 0x407340
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x58]
mov byte [esp + 0x3ac], 1
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x38]
mov byte [esp + 0x3a8], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov edx, dword [ebp + 0xc]
push edx
push ecx
lea eax, [esp + 0x64]
push str.GET
push eax
call fcn.004030a0
add esp, 0xc
push eax
call fcn.004030a0
mov ecx, dword [ebp + 4]
add esp, 8
push ecx
push ecx
lea edx, [esp + 0x64]
push str._HTTP_1.0_r_nConnection:_close_r_nUser_Agent:_autoupdate_1.0__r_nProgma:_no_cache_r_nHost:
push edx
call fcn.004030a0
add esp, 0xc
push eax
call fcn.004030a0
movzx eax, word [ebp + 8]
add esp, 8
cmp ax, 0x50
je 0x40441d
push eax
push ecx
lea eax, [esp + 0x64]
push 0x40734c
push eax
call fcn.004030a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_short_int_]
lea ecx, [esp + 0x5c]
push 0x4075b4
push ecx
call fcn.004030a0
mov esi, dword [esp + 0x3c0]
add esp, 8
cmp esi, ebx
jl 0x4044b2
jg 0x404445
cmp dword [esp + 0x3b4], ebx
jbe 0x4044b2
lea edx, [esp + 0x5c]
push str.Range:_bytes
push edx
call fcn.004030a0
push 0x200
lea eax, [esp + 0x1a8]
push ebx
push eax
call sub.MSVCR90.dll_memset
mov ecx, dword [esp + 0x3c8]
add esp, 0x14
push esi
push ecx
push str._I64d
lea edx, [esp + 0x1a8]
push 0x1ff
push edx
call dword [sym.imp.MSVCR90.dll__snprintf]
add esp, 0x14
push 0x4075c8
push ecx
lea eax, [esp + 0x1a4]
push eax
lea ecx, [esp + 0x68]
push ecx
call fcn.004030a0
add esp, 0xc
push eax
call fcn.004030a0
add esp, 8
lea edx, [esp + 0x5c]
push 0x4075b4
push edx
call fcn.004030a0
mov ecx, dword [edi + 0x88]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
add esp, 8
push 8
lea eax, [esp + 0x2c]
push eax
push 0x1005
push 0xffff
push ecx
mov dword [esp + 0x3c], 0x7530
mov dword [esp + 0x40], ebx
call esi
cmp eax, ebx
jne 0x404516
mov eax, dword [edi + 0x88]
push 8
lea edx, [esp + 0x2c]
push edx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x3c], 0x7530
call esi
lea ecx, [esp + 0x164]
push ecx
lea ecx, [esp + 0x58]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov esi, eax
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x58]
mov byte [esp + 0x3ac], 2
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov byte [esp + 0x3a8], 3
cmp dword [eax + 0x18], 0x10
mov esi, dword [esi + 0x14]
jb 0x404557
mov eax, dword [eax + 4]
jmp 0x40455a
add eax, 4
mov edx, dword [edi]
push esi
push eax
mov eax, dword [edx + 4]
mov ecx, edi
call eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x3a8], 2
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x164]
mov byte [esp + 0x3a8], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push edi
lea eax, [esp + 0x1a0]
call fcn.004041f0
add esp, 4
cmp eax, ebx
jle 0x404990
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1a0]
push str._s__d
push edx
mov dword [esp + 0x28], ebx
mov byte [esp + eax + 0x1a8], bl
call dword [sym.imp.MSVCR90.dll_sscanf]
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp eax, 0x1f7
je 0x404990
cmp dword [esp + 0x3b8], ebx
jg 0x4045f3
jl 0x4045ec
cmp dword [esp + 0x3b4], ebx
ja 0x4045f3
cmp eax, 0xc8
jmp 0x4045f8
cmp eax, 0xce
je 0x404634
cmp eax, 0x12d
je 0x404634
cmp eax, 0x12e
je 0x404634
lea ecx, [esp + 0x54]
mov dword [esp + 0x3a8], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
or eax, 0xffffffff
jmp 0x4049f4
mov edi, dword [esp + 0x24]
push edi
lea eax, [esp + 0x1a0]
call fcn.004041f0
mov edi, eax
add esp, 4
cmp edi, ebx
jle 0x404997
mov byte [esp + edi + 0x19c], bl
mov al, byte [esp + 0x19c]
cmp al, 0xd
je 0x4049da
cmp al, bl
je 0x4049da
push 0xf
lea eax, [esp + 0x1a0]
push str.Content_Length:
push eax
call dword [sym.imp.MSVCR90.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x4046a6
mov esi, dword [esp + 0x34]
cmp esi, ebx
je 0x4046a6
lea ecx, [esp + 0x1ab]
push ecx
call dword [sym.imp.MSVCR90.dll__atoi64]
add esp, 4
mov dword [esi], eax
mov dword [esi + 4], edx
mov eax, dword [esp + 0x1c]
cmp eax, 0x12d
je 0x4046bc
cmp eax, 0x12e
jne 0x404630
push 9
lea edx, [esp + 0x1a0]
push str.Location:
push edx
call dword [sym.imp.MSVCR90.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x404630
mov esi, 9
cmp edi, esi
jle 0x40470f
jmp 0x4046f0
movsx eax, byte [esp + esi + 0x19c]
push eax
call dword [sym.imp.MSVCR90.dll_isspace]
add esp, 4
test eax, eax
je 0x4047bc
inc esi
cmp esi, edi
jl 0x4046f0
mov edi, dword [esp + 0x18]
xor eax, eax
cmp byte [esp + 0x19c], 0xd
je 0x404735
nop
cmp byte [esp + eax + 0x19c], 0xa
je 0x404735
inc eax
cmp byte [esp + eax + 0x19c], 0xd
jne 0x404720
mov byte [esp + eax + 0x19c], bl
cmp edi, ebx
je 0x4049be
push 1
push 3
lea ecx, [esp + 0xe4]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_int_]
mov byte [esp + 0x3a8], 4
cmp byte [edi], 0x2f
jne 0x4047cc
mov ecx, dword [ebp + 4]
push ecx
push ecx
lea edx, [esp + 0xec]
push str.http:__
push edx
call fcn.004030a0
add esp, 0xc
push eax
call fcn.004030a0
movzx eax, word [ebp + 8]
add esp, 8
cmp ax, 0x50
je 0x4047ae
push eax
push ecx
lea eax, [esp + 0xec]
push 0x40734c
push eax
call fcn.004030a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_short_int_]
push edi
lea ecx, [esp + 0xe8]
push ecx
jmp 0x404884
lea edi, [esp + esi + 0x19c]
mov dword [esp + 0x18], edi
jmp 0x404713
push 0x407350
push edi
call dword [sym.imp.MSVCR90.dll_strstr]
add esp, 8
test eax, eax
jne 0x40487b
mov edx, dword [ebp + 4]
push edx
push ecx
lea eax, [esp + 0xec]
push str.http:__
push eax
call fcn.004030a0
add esp, 0xc
push eax
call fcn.004030a0
movzx eax, word [ebp + 8]
add esp, 8
cmp ax, 0x50
je 0x40482f
push eax
push ecx
lea ecx, [esp + 0xec]
push 0x40734c
push ecx
call fcn.004030a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_short_int_]
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov esi, eax
push 0x2f
push esi
call dword [sym.imp.MSVCR90.dll_strrchr]
add esp, 8
cmp eax, ebx
je 0x404851
mov byte [eax + 1], bl
lea eax, [esp + 0xe4]
push esi
push eax
call fcn.004030a0
lea ecx, [esp + 0xec]
push edi
push ecx
call fcn.004030a0
push esi
mov esi, dword [sym.imp.MSVCR90.dll_free]
call esi
add esp, 0x14
jmp 0x404892
push edi
lea edx, [esp + 0xe8]
push edx
call fcn.004030a0
mov esi, dword [sym.imp.MSVCR90.dll_free]
add esp, 8
lea eax, [esp + 0x180]
push eax
lea ecx, [esp + 0xe0]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov edi, dword [esp + 0x30]
push edi
mov ecx, eax
mov byte [esp + 0x3ac], 5
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::swap_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____]
lea ecx, [esp + 0x180]
mov byte [esp + 0x3a8], 4
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x4048de
push eax
call esi
add esp, 4
mov eax, dword [ebp]
mov dword [ebp + 4], ebx
cmp eax, ebx
je 0x4048ee
push eax
call esi
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [ebp], ebx
cmp eax, ebx
je 0x4048fe
push eax
call esi
add esp, 4
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0xc], ebx
cmp eax, ebx
je 0x40490e
push eax
call esi
add esp, 4
mov eax, dword [ebp + 0x14]
mov dword [ebp + 0x10], ebx
cmp eax, ebx
je 0x40491e
push eax
call esi
add esp, 4
mov dword [ebp + 0x14], ebx
cmp dword [edi + 0x18], 0x10
jb 0x40492c
mov eax, dword [edi + 4]
jmp 0x40492f
lea eax, [edi + 4]
push ebp
push eax
call fcn.00403ce0
mov eax, dword [esp + 0x28]
inc eax
add esp, 8
cmp eax, 0x32
mov dword [esp + 0x20], eax
mov byte [esp + 0x3a8], bl
lea ecx, [esp + 0xdc]
jg 0x4049b8
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
mov edi, dword [esp + 0x24]
jmp 0x404300
movzx ecx, word [ebp + 8]
mov edx, dword [ebp + 4]
push 0x1e
push ecx
push edx
call fcn.004011a0
add esp, 0xc
lea ecx, [esp + 0x54]
mov dword [esp + 0x3a8], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
xor eax, eax
jmp 0x4049f4
call fcn.004011a0
jmp 0x404977
mov esi, dword [sym.imp.MSVCR90.dll__errno]
call esi
mov ebx, eax
call esi
mov esi, eax
mov eax, dword [ebx]
push eax
call dword [sym.imp.MSVCR90.dll_strerror]
mov ecx, dword [esi]
add esp, 4
push eax
push ecx
push edi
jmp 0x40496f
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
lea ecx, [esp + 0x54]
mov dword [esp + 0x3a8], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
mov eax, 1
jmp 0x4049f4
lea ecx, [esp + 0x54]
mov dword [esp + 0x3a8], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
mov eax, 2
mov ecx, dword [esp + 0x3a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x388]
xor ecx, esp
call fcn.00405b7b
add esp, 0x398
ret