Function at 0x406690
Capabilities:
Check http status code
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push 0xffffffffffffffff
push 0x4c94d2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x8c], 0
push str.Error
lea ecx, [esp + 0x14]
mov dword [esp + 0x9c], 3
call fcn.004b7a6a
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x4c]
mov byte [esp + 0x98], 4
rep stosd dword es:[edi], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea eax, [esp + 0x50]
push str.Agent_ld
push eax
call fcn.004a0634
add esp, 0xc
lea ecx, [esp + 0x4c]
push 0
push 0
push 0
push 0
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
test ebp, ebp
jne 0x406742
mov esi, dword [esp + 0xa0]
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call fcn.004b7771
mov ebx, 1
mov dword [esp + 0x8c], ebx
jmp 0x406929
mov eax, dword [esp + 0xa8]
push 0
push 0
push 3
push 0x533b8c
push 0x533b8c
push 0
push eax
push ebp
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
test ebx, ebx
jne 0x406775
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x4068b8
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0xa4]
push 0
push 0x4000000
push 0
push 0
push str.HTTP_1.0
push edx
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
test esi, esi
jne 0x4067ae
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
jmp 0x4068b3
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x4067e8
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
push ebp
call esi
mov esi, dword [esp + 0xa0]
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call fcn.004b7771
jmp 0x40691d
lea eax, [esp + 0x14]
push 0
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x20000013
push esi
mov dword [esp + 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4067c1
cmp dword [esp + 0x18], 0xc8
jne 0x406843
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x2c]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
lea edx, [esp + 0x30]
push ecx
push edx
push 5
push esi
mov dword [esp + 0x30], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40686a
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
push ebp
call esi
mov esi, dword [esp + 0xa0]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.004b7771
jmp 0x40691d
lea ecx, [esp + 0x2c]
push ecx
call fcn.004a07be
inc eax
push eax
mov dword [esp + 0x28], eax
call fcn.004b3c5b
add esp, 8
mov edi, eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x24]
push edx
push eax
push edi
push esi
mov dword [edi], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4068cd
push edi
call fcn.004b3c84
add esp, 4
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
push ebp
call esi
mov esi, dword [esp + 0xa0]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.004b7771
jmp 0x40691d
mov edx, dword [esp + 0x24]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [edx + edi], 0
call esi
push ebx
call esi
push ebp
call esi
push edi
lea ecx, [esp + 0x14]
call fcn.004b7b85
push edi
call fcn.004b3c84
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call fcn.004b7771
mov esi, dword [esp + 0xa4]
mov ecx, dword [esp + 0x2c]
push esi
mov byte [esp + 0xa0], 4
call fcn.00407970
mov ebx, 1
mov dword [esp + 0x8c], ebx
lea ecx, [esp + 0x10]
mov byte [esp + 0x98], 3
call fcn.004b79fc
lea ecx, [esp + 0xa4]
mov byte [esp + 0x98], 2
call fcn.004b79fc
lea ecx, [esp + 0xa8]
mov byte [esp + 0x98], bl
call fcn.004b79fc
lea ecx, [esp + 0xac]
mov byte [esp + 0x98], 0
call fcn.004b79fc
mov ecx, dword [esp + 0x90]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x8c
ret 0x10