Function at 0x501e60
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Send data
Send http request
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6ef130
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
mov eax, dword [0x7ce4e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0xa4], esi
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xac], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xb0], eax
xor eax, eax
movups xmmword [ebp - 0x98], xmm0
mov dword [esi + 8], 0
movups xmmword [ebp - 0x80], xmm0
mov byte [esi + 5], 0
movups xmmword [ebp - 0x68], xmm0
mov byte [ebp - 0x9c], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 7
mov word [ebp - 0x98], ax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], 7
mov word [ebp - 0x80], ax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], 7
mov word [ebp - 0x68], ax
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], eax
lea eax, [esi + 0x14]
push ecx
push eax
call fcn.005012e0
cmp dword [esi + 0x40], 8
lea eax, [esi + 0x2c]
jb 0x501f28
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], 1
mov eax, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0xa8], eax
test edi, edi
jne 0x501f62
mov dword [esi + 8], 1
mov byte [ebp - 0x9d], 0
jmp 0x502295
push ecx
mov edx, 1
call fcn.005015d0
add esp, 4
test al, al
je 0x501f9c
push ecx
mov edx, 3
call fcn.005015d0
add esp, 4
test al, al
jne 0x501f9c
push 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0xa80
push eax
push 0x54
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
cmp byte [esi + 4], 0
je 0x501fb6
cmp dword [esi + 0x28], 8
lea eax, [esi + 0x14]
jb 0x501fad
mov eax, dword [eax]
mov edx, eax
mov ecx, edi
call fcn.00501790
mov eax, dword [esi + 0x10]
test eax, eax
je 0x501fc8
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp dword [ebp - 0x84], 8
lea eax, [ebp - 0x98]
push 0
push dword [ebp - 0x9a]
cmovae eax, dword [ebp - 0x98]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x2c], esi
mov byte [ebp - 4], 2
test esi, esi
jne 0x502014
mov ecx, dword [ebp - 0xa4]
mov byte [ebp - 0x9d], al
mov dword [ecx + 8], 2
jmp 0x502284
mov cl, byte [ebp - 0x9c]
mov edx, 0x100
test cl, cl
mov byte [ebp - 0x9d], cl
mov eax, 0x800100
cmove eax, edx
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x14], eax
mov eax, SysReAllocString
sub eax, edx
cmp eax, dword [ebp - 0x58]
jb 0x5022da
cmp dword [ebp - 0x6c], 8
lea ecx, [ebp - 0x80]
push dword [ebp - 0x58]
cmovae ecx, dword [ebp - 0x80]
lea eax, [ebp - 0x68]
cmp dword [ebp - 0x54], 8
cmovae eax, dword [ebp - 0x68]
push eax
push edx
push ecx
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x2c]
lea ecx, [ebp - 0xc8]
call fcn.004b51a0
push dword [ebp - 0x14]
cmp dword [ebp - 0xb4], 8
lea eax, [ebp - 0xc8]
push 0
cmovae eax, dword [ebp - 0xc8]
mov ecx, 0x79ab20
cmp dword [ebp - 0x50], 0
push 0
push 0
push eax
mov eax, 0x79ab2c
cmovne eax, ecx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x34], esi
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 3
call fcn.004743f0
test esi, esi
jne 0x5020db
mov ecx, dword [ebp - 0xa4]
mov byte [ebp - 0x9d], 0
mov dword [ecx + 8], 3
jmp 0x502276
cmp byte [ebp - 0x9d], 0
je 0x502119
lea eax, [ebp - 0x24]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x24], 4
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
or dword [ebp - 0x14], 0x13180
lea eax, [ebp - 0x14]
push 4
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 2
push eax
push 0x58
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov ecx, dword [ebp - 0xa4]
lea eax, [ebp - 0x4c]
push eax
call fcn.00501100
mov byte [ebp - 4], 4
cmp dword [ebp - 0x3c], 0
je 0x502162
cmp dword [ebp - 0x38], 8
lea eax, [ebp - 0x4c]
push 0x20000000
cmovae eax, dword [ebp - 0x4c]
push 0xffffffffffffffff
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov eax, dword [ebp + 0x10]
xor ecx, ecx
cmp dword [ebp - 0x50], ecx
push 0
cmove eax, ecx
push eax
push ecx
push ecx
push ecx
push ecx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x5021d9
mov edx, dword [ebp - 0xac]
test edx, edx
je 0x5021c2
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x5021c2
lea eax, [ebp - 0x50]
mov dword [ebp - 0x50], 0
push eax
push ecx
push edx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
je 0x5021ec
mov edx, dword [ebp - 0xac]
mov ecx, dword [ebp + 0x10]
add edx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x50]
mov dword [ebp - 0xac], edx
mov dword [ebp + 0x10], ecx
jne 0x502190
mov eax, dword [ebp - 0xa4]
push 0
push esi
mov byte [eax + 5], 1
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x5021fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov eax, dword [ebp - 0xa4]
mov dword [eax + 8], ecx
jmp 0x502267
mov eax, dword [ebp - 0xa4]
mov ecx, 5
mov dword [eax + 8], ecx
jmp 0x502267
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], 4
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x50225a
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xa4]
lea eax, [edx - 0x190]
mov dword [ecx + 0xc], edx
cmp eax, 0xc7
ja 0x502244
mov dword [ecx + 8], edx
jmp 0x502267
mov edx, dword [ebp - 0xb0]
mov ecx, esi
call fcn.00501b20
mov byte [ebp - 0x9d], 1
jmp 0x50226e
mov eax, dword [ebp - 0xa4]
mov dword [eax + 8], 7
mov byte [ebp - 0x9d], 0
lea ecx, [ebp - 0x4c]
call fcn.004743f0
test esi, esi
je 0x502281
push esi
call dword [ebp - 0xa8]
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x50228f
push esi
call dword [ebp - 0xa8]
mov eax, dword [ebp - 0xa8]
test edi, edi
je 0x50229c
push edi
call eax
lea ecx, [ebp - 0x68]
call fcn.004743f0
lea ecx, [ebp - 0x80]
call fcn.004743f0
lea ecx, [ebp - 0x98]
call fcn.004743f0
mov al, byte [ebp - 0x9d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005be209
mov esp, ebp
pop ebp
ret 0x18
call fcn.00474380
int3