Function at 0x5097e0
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 0x5737e7
mov eax, dword fs:[0]
push eax
mov eax, 0x1330
call fcn.0053fde0
mov eax, dword [0x5bda40]
xor eax, esp
mov dword [esp + 0x1328], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5bda40]
xor eax, esp
push eax
lea eax, [esp + 0x1344]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x1354]
mov eax, dword [esp + 0x1358]
xor ebx, ebx
push eax
lea ecx, [esp + 0x11c]
mov dword [esp + 0x1350], ebx
call fcn.004020a0
mov byte [esp + 0x134c], 1
jmp 0x509850
lea ecx, [ebp + 0x54]
mov dword [esp + 0x18], ebx
call fcn.00448e70
mov eax, dword [ebp + 0x4c]
lea ecx, [esp + 0x118]
push ecx
lea edi, [ebp + 0x14]
mov ecx, edi
mov dword [ebp + 0x7c], 0xffffffff
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], eax
call fcn.00403050
lea edx, [esp + 0x135c]
lea esi, [ebp + 0x30]
push edx
mov ecx, esi
call fcn.00403050
mov ecx, esi
call fcn.00402120
test al, al
je 0x50990e
push ebx
push 0x5a3c48
mov ecx, edi
call fcn.00410e00
mov esi, eax
cmp esi, 0xffffffff
je 0x50990e
lea ebx, [esi + 1]
mov eax, edi
lea ecx, [esp + 0x38]
call fcn.00503d00
push eax
lea ecx, [ebp + 0x30]
mov byte [esp + 0x1350], 2
call fcn.00403050
mov bl, 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x134c], bl
call fcn.004020e0
mov eax, esi
lea ecx, [esp + 0x38]
call fcn.00503c90
push eax
lea ecx, [ebp + 0x14]
mov byte [esp + 0x1350], 3
call fcn.00403050
lea ecx, [esp + 0x38]
mov byte [esp + 0x134c], bl
call fcn.004020e0
lea ecx, [ebp + 0x30]
call fcn.00402120
test al, al
jne 0x509922
mov dword [esp + 0x24], 1
mov eax, dword [ebp + 0xc]
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x50993f
mov dword [esp + 0x18], 1
jmp 0x509eaa
lea ecx, [esp + 0x70]
call fcn.00402070
lea ecx, [esp + 0x8c]
call fcn.00402070
lea ecx, [esp + 0xa8]
call fcn.00402070
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x30]
push edx
lea ebx, [esp + 0xb0]
lea edi, [esp + 0x94]
lea esi, [esp + 0x78]
lea ecx, [ebp + 0x14]
mov byte [esp + 0x1354], 6
call fcn.00508950
lea ecx, [esp + 0x54]
call fcn.00410380
mov byte [esp + 0x134c], 7
mov eax, dword [ebp + 8]
test eax, eax
jne 0x5099ba
lea ecx, [ebp + 0x30]
lea esi, [esp + 0x38]
call fcn.00503950
mov byte [esp + 0x134c], 8
jmp 0x5099d3
cmp eax, 1
jne 0x5099e6
lea ecx, [ebp + 0x30]
lea edi, [esp + 0x38]
call fcn.00503310
mov byte [esp + 0x134c], 9
push eax
lea ecx, [esp + 0x58]
call fcn.00445680
lea ecx, [esp + 0x38]
call fcn.00402030
push 0
push 0
push 0
push 0
push 0x5a1bbc
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [esp + 0x20], esi
test esi, esi
jne 0x509a3a
lea ecx, [esp + 0x54]
call fcn.00402030
lea ecx, [esp + 0xa8]
call fcn.004020e0
lea ecx, [esp + 0x8c]
call fcn.004020e0
lea ecx, [esp + 0x70]
mov byte [esp + 0x134c], 1
call fcn.004020e0
jmp 0x509e9f
mov eax, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
push 0
push eax
call ebx
test eax, eax
jne 0x509a56
mov dword [esp + 0x18], 1
jmp 0x509a03
mov ecx, dword [esp + 0x2c]
push 0
push 0
push 3
push 0
push 0
push ecx
lea ecx, [esp + 0x88]
call fcn.00402100
push eax
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
mov dword [esp + 0x28], edi
test edi, edi
jne 0x509aba
lea ecx, [esp + 0x54]
call fcn.00402030
lea ecx, [esp + 0xa8]
call fcn.004020e0
lea ecx, [esp + 0x8c]
call fcn.004020e0
lea ecx, [esp + 0x70]
mov byte [esp + 0x134c], 1
call fcn.004020e0
jmp 0x509e94
mov edx, dword [ebp + 0xc]
push 0
push edx
call ebx
test eax, eax
jne 0x509ad0
mov dword [esp + 0x18], 1
jmp 0x509a83
lea ecx, [esp + 0xe0]
call fcn.00402070
cmp dword [esp + 0x24], 0
mov byte [esp + 0x134c], 0xa
lea ecx, [esp + 0xe0]
jne 0x509af9
push 0x5a3e98
jmp 0x509afe
push str.POST
call fcn.00410dc0
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x90]
push ecx
lea esi, [esp + 0x104]
call fcn.0050a7b0
add esp, 8
mov byte [esp + 0x134c], 0xb
cmp dword [esp + 0x34], 4
mov eax, 0x80400002
jne 0x509b3b
mov eax, 0x80c00002
push 0
push eax
push 0
push 0
push 0
lea ecx, [esp + 0x110]
call fcn.00402100
push eax
lea ecx, [esp + 0xf8]
call fcn.00402100
push eax
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
test edi, edi
je 0x509e37
mov edx, dword [ebp + 0xc]
push 0
push edx
call ebx
test eax, eax
jne 0x509b88
mov dword [esp + 0x18], 1
jmp 0x509e37
push str.Content_Type:_application_x_www_form_urlencoded_r_n
lea ecx, [esp + 0xc8]
call fcn.004020a0
push 0x20000000
lea ecx, [esp + 0xc8]
mov byte [esp + 0x1350], 0xc
call fcn.0042bf40
push eax
lea ecx, [esp + 0xcc]
call fcn.00402100
mov ebx, dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push eax
push edi
call ebx
test eax, eax
je 0x509e2b
lea esi, [ebp + 0xb8]
mov ecx, esi
call fcn.00402120
test al, al
jne 0x509c28
mov ecx, esi
call fcn.00402100
push eax
push str.Referer:__s_r_n
lea ecx, [esp + 0xcc]
call fcn.00503d40
add esp, 8
push 0x20000000
lea ecx, [esp + 0xc8]
call fcn.0042bf40
push eax
lea ecx, [esp + 0xcc]
call fcn.00402100
push eax
push edi
call ebx
test eax, eax
je 0x509e2b
lea ecx, [esp + 0x54]
call fcn.0042bf40
push eax
lea ecx, [esp + 0x58]
call fcn.00402050
push eax
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x509e2b
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
xor eax, eax
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x13c]
push edx
push 5
mov ebx, 0x104
push edi
mov word [esp + 0x148], ax
mov dword [esp + 0x28], ebx
call esi
test eax, eax
je 0x509cb3
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x134]
push edx
xor eax, eax
push str.Content_length:__s__n
mov word [esp + ecx*2 + 0x13c], ax
call fcn.0053c054
lea eax, [esp + 0x13c]
push eax
call fcn.0053a651
add esp, 0xc
mov dword [esp + 0x30], eax
push 0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x13c]
push edx
push 0x13
push edi
mov dword [esp + 0x28], ebx
call esi
test eax, eax
je 0x509d11
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x134]
push edx
xor eax, eax
push str.Status_code:__s__n
mov word [esp + ecx*2 + 0x13c], ax
call fcn.0053c054
lea eax, [esp + 0x13c]
push eax
call fcn.0053a651
add esp, 0xc
mov dword [ebp + 0x7c], eax
cmp eax, 0xc8
jne 0x509d11
mov dword [esp + 0x1c], 1
push 0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x13c]
push edx
push 0x14
push edi
mov dword [esp + 0x28], ebx
call esi
test eax, eax
je 0x509d50
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x134]
push edx
xor eax, eax
push str.Status_text:__s__n
mov word [esp + ecx*2 + 0x13c], ax
call fcn.0053c054
add esp, 8
lea eax, [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x344]
push ecx
push edi
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x24], 0x1000
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x509e12
lea ecx, [ecx]
cmp dword [esp + 0x14], 0
jbe 0x509e12
mov ecx, dword [esp + 0x30]
test ecx, ecx
jle 0x509d9d
mov eax, esi
imul eax, eax, 0x64
cdq
idiv ecx
mov ebx, eax
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x509db5
fldz
mov edx, dword [ecx]
mov eax, dword [edx + 4]
sub esp, 8
fstp qword [esp]
push ebx
push ebp
call eax
mov ecx, dword [esp + 0x14]
lea edx, [esi + ecx]
push edx
lea ecx, [ebp + 0x54]
call fcn.004488b0
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x340]
push ecx
lea ecx, [ebp + 0x54]
call fcn.004478e0
add eax, esi
push eax
call fcn.00543950
add esi, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push 0x1000
lea eax, [esp + 0x344]
push eax
push edi
mov dword [esp + 0x24], 0x1000
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x509d80
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x509e2b
fldz
mov edx, dword [ecx]
mov eax, dword [edx + 4]
sub esp, 8
fstp qword [esp]
push 0x64
push ebp
call eax
lea ecx, [esp + 0xc4]
call fcn.004020e0
lea ecx, [esp + 0xfc]
call fcn.004020e0
lea ecx, [esp + 0xe0]
call fcn.004020e0
lea ecx, [esp + 0x54]
call fcn.00402030
lea ecx, [esp + 0xa8]
call fcn.004020e0
lea ecx, [esp + 0x8c]
call fcn.004020e0
lea ecx, [esp + 0x70]
mov byte [esp + 0x134c], 1
call fcn.004020e0
test edi, edi
je 0x509e8c
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
test edi, edi
je 0x509e9f
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test esi, esi
je 0x509eaa
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp + 0x10]
xor ebx, ebx
cmp ecx, ebx
je 0x509f17
cmp dword [esp + 0x18], ebx
jne 0x509f17
cmp dword [esp + 0x1c], ebx
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [ebp + 0xc]
push eax
sete al
movzx eax, al
push eax
push ebp
lea eax, [esp + 0x44]
push eax
call edx
push eax
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1350], 0xd
call fcn.00403050
lea ecx, [esp + 0x38]
mov byte [esp + 0x134c], 1
call fcn.004020e0
lea ecx, [esp + 0x118]
call fcn.00402120
test al, al
jne 0x509f17
lea ecx, [ebp + 0x30]
call fcn.00459610
jmp 0x509850
lea ecx, [esp + 0x118]
call fcn.004020e0
lea ecx, [esp + 0x135c]
call fcn.004020e0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1344]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1328]
xor ecx, esp
call fcn.00538a54
add esp, 0x133c
ret 0x24