Function at 0x405790
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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45fda8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4cc
mov eax, dword [0x47f244]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], eax
xor edi, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x14]
push eax
lea edx, [ebp - 0x18]
push ecx
lea eax, [ebp - 0x30]
push edx
push eax
push esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x38], 0x20
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x64], 0x47c220
mov dword [ebp - 0x60], edi
call fcn.0045435f
test eax, eax
jne 0x405864
mov ecx, dword [0x47f244]
mov dword [ebp + 8], ecx
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00447f35
push 0x47c1e0
lea ecx, [ebp + 8]
call fcn.00448188
push esi
lea ecx, [ebp + 8]
call fcn.00448188
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x18]
push eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x30]
push ecx
push edx
push eax
call fcn.0045435f
test eax, eax
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
jne 0x40585f
call fcn.00447dac
jmp 0x40598e
call fcn.00447dac
lea ecx, [ebp - 0x5c]
call fcn.00448472
mov ecx, dword [ebp + 0xc]
push edi
push 0x1021
push ecx
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.00448624
mov edx, dword [0x47f244]
test eax, eax
jne 0x4058f1
mov dword [ebp + 0xc], edx
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp + 0xc]
push 0x47c1dc
push eax
call fcn.0043e0d9
mov ecx, dword [0x47f244]
add esp, 0xc
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 0xc]
lea eax, [ebp + 8]
push edx
push 3
push eax
mov byte [ebp - 4], 5
call fcn.0044f404
mov ecx, dword [ebp + 8]
push 0x30
push 0x47c228
push ecx
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp + 8]
mov byte [ebp - 4], 4
call fcn.00447dac
mov byte [ebp - 4], 3
lea ecx, [ebp + 0xc]
jmp 0x40597d
mov dword [ebp - 0x24], edx
push 0x2f
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.0043dd31
cmp eax, 0xffffffff
jne 0x405916
push 0x5c
lea ecx, [ebp - 0x14]
call fcn.0043dd31
cmp eax, 0xffffffff
je 0x40594e
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx - 8]
cmp edx, 1
jle 0x40594e
mov ecx, edx
sub ecx, eax
lea eax, [ebp + 8]
dec ecx
push ecx
push eax
lea ecx, [ebp - 0x14]
call fcn.0043dbe7
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 7
call fcn.00447ee5
lea ecx, [ebp + 8]
mov byte [ebp - 4], 6
call fcn.00447dac
jmp 0x40595a
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x24]
call fcn.00447ee5
call fcn.004571ca
mov eax, dword [eax + 0x10]
push edi
push edi
push edi
push edi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x28], ebx
jne 0x4059bc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00447dac
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
call fcn.00448567
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00447dac
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.00447dac
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x18]
push edi
push edi
push 3
push edi
push edi
push edx
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
mov dword [ebp - 0x3c], 0
test edi, edi
mov dword [ebp + 0xc], edi
je 0x405bf3
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x14]
sub eax, 0x100b
push 0
neg eax
sbb eax, eax
lea ecx, [ebp - 0x64]
and eax, 0xff7fce80
add eax, 0x84c03180
push eax
push ecx
push 0
push 0
push edx
push 0
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
test esi, esi
mov dword [ebp - 0x4c], esi
je 0x405be8
mov ebx, dword [sym.imp.WININET.dll_InternetErrorDlg]
mov edi, dword [ebp - 0x1c]
push 0
push 0
push 0
inc edi
push 0
push esi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x405ac8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x1c]
cmp eax, 4
jge 0x405aa2
lea eax, [ebp - 0x48]
lea ecx, [ebp + 8]
push eax
push ecx
push 0x1f
push esi
mov dword [ebp - 0x48], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
mov eax, edi
sub eax, 0x2f0d
je 0x405a88
sub eax, 0xc
mov eax, dword [ebp + 8]
je 0x405a84
or eax, 0x3180
jmp 0x405a8e
or al, 0x80
jmp 0x405a8e
mov eax, dword [ebp + 8]
or ah, 1
lea edx, [ebp + 8]
push 4
push edx
push 0x1f
push esi
mov dword [ebp + 8], eax
call dword [sym.imp.WININET.dll_InternetSetOptionA]
jmp 0x405a26
cmp eax, 0x3e8
jge 0x405bd7
push 0
push 7
push edi
push esi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call ebx
mov dword [ebp - 0x1c], 0x3e8
jmp 0x405a26
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea eax, [ebp - 0x38]
push 0
lea ecx, [ebp - 0xa4]
push eax
push ecx
push 0x13
push esi
call edi
test eax, eax
je 0x405bd7
lea edx, [ebp - 0xa4]
push edx
call fcn.0042ab68
add esp, 4
cmp eax, 0x197
je 0x405b05
cmp eax, 0x191
jne 0x405b3a
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0xd8]
push eax
push 0x32
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x405b05
push 0
push 7
push 0x2eee
push esi
push 0
call ebx
cmp eax, 0x2f00
jne 0x405b45
jmp 0x405a26
cmp eax, 0xc8
jne 0x405bd7
lea edx, [ebp - 0x38]
push 0
lea eax, [ebp - 0x84]
push edx
push eax
push 5
push esi
call edi
test eax, eax
je 0x405b6a
lea ecx, [ebp - 0x84]
push ecx
call fcn.0042ab68
add esp, 4
mov bl, 9
lea edx, [ebp - 0x20]
mov eax, 0x400
push edx
push eax
lea eax, [ebp - 0x4d8]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x405bd7
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x405bc8
lea ecx, [ebp - 0x44]
call fcn.00449fe6
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x4d8]
push ecx
push edx
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], bl
call fcn.0044877b
mov dword [ebp - 4], 6
call fcn.0044a024
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
add ecx, eax
test eax, eax
mov dword [ebp - 0x2c], ecx
jne 0x405b6c
lea ecx, [ebp - 0x5c]
call fcn.0044883f
mov dword [ebp - 0x3c], 1
test esi, esi
je 0x405be2
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x28]
test edi, edi
je 0x405bf3
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x405bfe
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.00447dac
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
call fcn.00448567
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00447dac
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.00447dac
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret