Function at 0x40177b
Capabilities:
Connect to http server
Create http request
Parse url
Read data from internet
Receive data
Send data
Send http request
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2664
call fcn.00401d60
push ebx
push esi
push edi
push 1
pop edi
xor ebx, ebx
cmp dword [ebp + 8], edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0x1264], bl
mov dword [ebp - 8], edi
jle 0x4018c3
mov eax, dword [ebp + 0xc]
push 4
mov dword [ebp - 4], 2
pop edi
lea esi, [eax + 4]
add eax, 8
mov dword [ebp + 0xc], eax
push 0x401574
push dword [esi]
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
jne 0x401801
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 8]
jge 0x4017f7
inc dword [ebp - 8]
inc dword [ebp - 4]
add dword [ebp + 0xc], edi
mov eax, dword [esi + edi]
add esi, edi
mov dword [ebp - 0xc], eax
jmp 0x4018a4
call fcn.0040173c
jmp 0x4018a4
push 0x401564
push dword [esi]
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
jne 0x40182e
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 8]
jge 0x4017f7
inc dword [ebp - 8]
inc dword [ebp - 4]
add dword [ebp + 0xc], edi
mov eax, dword [esi + edi]
add esi, edi
mov dword [ebp - 0x1c], eax
jmp 0x4018a4
push 0x401554
push dword [esi]
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
jne 0x40185b
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 8]
jge 0x4017f7
inc dword [ebp - 8]
inc dword [ebp - 4]
add dword [ebp + 0xc], edi
mov eax, dword [esi + edi]
add esi, edi
mov dword [ebp - 0x10], eax
jmp 0x4018a4
mov eax, dword [ebp + 8]
cmp dword [ebp - 4], eax
jge 0x40188a
mov eax, dword [ebp + 0xc]
push dword [eax]
lea eax, [ebp - 0x20]
push dword [esi]
push eax
lea eax, [ebp - 0x1264]
push eax
call fcn.0040168a
add dword [ebp + 0xc], edi
add esp, 0x10
inc dword [ebp - 8]
inc dword [ebp - 4]
add esi, edi
jmp 0x4018a4
push 0x401550
lea eax, [ebp - 0x20]
push dword [esi]
push eax
lea eax, [ebp - 0x1264]
push eax
call fcn.0040168a
add esp, 0x10
inc dword [ebp - 8]
inc dword [ebp - 4]
mov eax, dword [ebp - 8]
add dword [ebp + 0xc], edi
add esi, edi
cmp eax, dword [ebp + 8]
jl 0x4017c7
cmp dword [ebp - 0x10], ebx
push 1
pop edi
jne 0x4018c8
call fcn.0040173c
lea eax, [ebp - 0x2664]
mov dword [ebp - 0x60], 0x3c
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x1664]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x60]
push eax
push ebx
push ebx
mov dword [ebp - 0x5c], ebx
push dword [ebp - 0x10]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], 0x1000
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x4c], 0x400
mov word [ebp - 0x48], di
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x401951
push 0x40154c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
push eax
push 0x4014f0
call esi
mov ecx, eax
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___unsigned_long_int_]
mov ecx, eax
call esi
mov dword [ebp - 0x14], edi
jmp 0x401d01
push dword [ebp - 0x10]
call sub.MSVCRT.dll_strlen
mov edx, dword [ebp - 0x4c]
pop ecx
mov ecx, dword [ebp - 0x58]
lea ecx, [edx + ecx + 3]
cmp ecx, eax
jbe 0x40196d
call fcn.0040173c
push ebx
push ebx
push ebx
push ebx
push 0x4014bc
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x10], esi
jne 0x40199d
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
push 0x401498
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
mov eax, edi
jmp 0x401d04
push 0x401490
lea eax, [ebp - 0x20]
push 0x401484
push eax
lea eax, [ebp - 0x1264]
push eax
call fcn.0040168a
add esp, 0x10
cmp dword [ebp - 0xc], ebx
je 0x4019e4
cmp dword [ebp - 0x1c], ebx
je 0x4019e4
push edi
push ebx
push 3
lea eax, [ebp - 0x1664]
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
push dword [ebp - 0x48]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp + 0xc], eax
jmp 0x401a3e
mov al, byte [0x401550]
push edi
push ebx
push 3
push dword [ebp - 0x1c]
mov byte [ebp + 0xb], al
lea eax, [ebp - 0x1664]
push dword [ebp - 0xc]
push dword [ebp - 0x48]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xb]
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionExA]
push eax
lea eax, [ebp + 0xb]
push eax
push 0x1c
push dword [ebp + 0xc]
call esi
lea eax, [ebp + 0xb]
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp + 0xb]
push eax
push 0x1d
push dword [ebp + 0xc]
call esi
cmp dword [ebp + 0xc], ebx
jne 0x401a5c
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
push 0x401450
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
mov dword [ebp - 0x14], edi
jmp 0x401cf8
lea eax, [ebp - 0x60]
push eax
call fcn.00401755
neg eax
sbb eax, eax
pop ecx
and eax, 0x800000
push edi
or eax, 0x84400000
push eax
push 0x403010
push ebx
lea eax, [ebp - 0x2664]
push ebx
push eax
push 0x401448
push dword [ebp + 0xc]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x401ab2
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
push 0x401424
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
mov dword [ebp - 0x14], edi
jmp 0x401ce1
mov esi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov edi, 0x10000000
push edi
push 0xffffffffffffffff
push 0x40111c
push eax
call esi
push edi
push 0xffffffffffffffff
push 0x401160
push dword [ebp + 8]
call esi
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push eax
lea eax, [ebp - 0xa64]
push 0x401408
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0xa64]
push edi
push 0xffffffffffffffff
push eax
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x1264]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x1264]
push eax
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x401bd6
mov ecx, 0xff
lea edi, [ebp - 0x863]
mov byte [ebp - 0x864], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
mov esi, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
push 0x4013f0
mov dword [ebp - 0xc], eax
call esi
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
mov edi, 0x40154c
push edi
push dword [ebp - 0xc]
push 0x4013e0
call esi
mov ecx, eax
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___unsigned_long_int_]
mov ecx, eax
call esi
lea eax, [ebp - 0x864]
push 0x4013d0
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
pop ecx
lea eax, [ebp - 0x864]
pop ecx
push ebx
push 0x400
push eax
push ebx
push dword [ebp - 0xc]
push ebx
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
lea eax, [ebp - 0x864]
push edi
push eax
push 0x4013c0
call esi
mov ecx, eax
call esi
mov ecx, eax
call esi
mov dword [ebp - 0x14], 1
jmp 0x401ce1
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
call fcn.004016f4
cmp dword [ebp - 0x24], 0x191
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
pop ecx
pop ecx
jne 0x401c9e
lea eax, [ebp - 0x18]
mov edi, 0x400
push eax
lea eax, [ebp - 0x464]
push edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x401c1c
cmp dword [ebp - 0x18], ebx
je 0x401c1c
lea eax, [ebp - 0x18]
push eax
jmp 0x401c00
push ebx
push 6
push 0x2eee
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
je 0x401c54
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
push 0x40139c
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
push 1
call dword [sym.imp.MSVCRT.dll_exit]
lea eax, [ebp - 0x1264]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x1264]
push eax
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
call fcn.004016f4
cmp dword [ebp - 0x24], 0x191
pop ecx
pop ecx
jne 0x401ca3
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cerr]
push 0x401384
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
jmp 0x401ca3
mov edi, 0x400
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x464]
push edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x401cd5
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x401cd5
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cout]
mov byte [ebp + eax - 0x464], bl
lea eax, [ebp - 0x464]
push eax
jmp 0x401c96
mov ecx, dword [sym.imp.MSVCIRT.dll_class_ostream_withassign_cout]
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::flush_void_]
cmp dword [ebp + 8], ebx
je 0x401cef
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret