Function at 0x5edc60
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Resolve function by parsing pe exports
Send data
Send http request
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x787f5b
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x867e6c]
xor eax, esp
mov dword [esp + 0x43c], eax
push ebx
push ebp
push edi
mov eax, dword [0x867e6c]
xor eax, esp
push eax
lea eax, [esp + 0x450]
mov dword fs:[0], eax
xor eax, eax
xor ebx, ebx
mov ebp, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], ebx
cmp byte [esi + 0x187], bl
jne 0x5ee05d
cmp byte [esi + 0x186], bl
jne 0x5ee059
mov eax, dword [esp + 0x14]
sub eax, ebx
je 0x5ee014
sub eax, 1
je 0x5edf9c
sub eax, 1
je 0x5eddfd
lea eax, [esp + 0x10]
push eax
push 0x400
lea ecx, [esp + 0x54]
push ecx
push ebp
mov dword [esp + 0x20], 0x400
call dword [sym.imp.wininet.dll_InternetReadFile]
test eax, eax
jne 0x5edd17
lea ecx, [eax + 0xa]
mov eax, esi
call fcn.005ee100
jmp 0x5ee04d
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x5edd2b
mov byte [esi + 0x186], 1
jmp 0x5ee04d
cmp dword [esi + 0x158], ebx
je 0x5edd9c
cmp byte [esi + 0x15c], bl
je 0x5edd9c
lea edi, [esi + 0x18c]
push edi
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
mov edx, dword [esi + 0x158]
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x54]
push 1
push ecx
call fcn.00644ce0
add esp, 0x10
cmp eax, dword [esp + 0x10]
je 0x5edd81
mov ecx, 0xb
mov eax, esi
call fcn.005ee100
push edi
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
jmp 0x5ee04d
mov edx, dword [esi + 0x158]
push edx
call fcn.006465e8
add esp, 4
push edi
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
jmp 0x5ee04d
push eax
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
call fcn.004016e0
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esi + 0x160]
mov dword [esp + 0x464], ebx
call fcn.00402720
mov dword [esp + 0x458], 0xffffffff
cmp dword [esp + 0x48], 0x10
jb 0x5ee04d
mov edx, dword [esp + 0x34]
push edx
call fcn.006441c7
add esp, 4
jmp 0x5ee04d
mov eax, dword [esi + 0x6c]
push 5
lea ecx, [esi + 0x58]
push str.https
push eax
push ebx
mov ebp, 0x400c000
call fcn.00402330
test eax, eax
jne 0x5ede1f
mov ebp, 0x480c000
mov eax, 0x10
cmp dword [esi + 0xe4], eax
jb 0x5ede34
mov ecx, dword [esi + 0xd0]
jmp 0x5ede3a
lea ecx, [esi + 0xd0]
cmp dword [esi + 0x100], eax
lea edi, [esi + 0xe8]
jb 0x5ede4d
mov eax, dword [edi + 4]
jmp 0x5ede50
lea eax, [edi + 4]
push ebx
push ebp
push ebx
push ebx
push ebx
push ecx
mov ecx, dword [esp + 0x40]
push eax
push ecx
call dword [sym.imp.wininet.dll_HttpOpenRequestA]
mov ebp, eax
cmp ebp, ebx
jne 0x5ede74
mov byte [esi + 0x187], 1
jmp 0x5ee04d
mov edx, dword [edi + 0x14]
push 4
push str.POST
push edx
push ebx
mov ecx, edi
call fcn.00402330
test eax, eax
jne 0x5eded2
mov edi, dword [esi + 0x150]
mov eax, 0x10
cmp dword [esi + 0x154], eax
jb 0x5edea6
mov edx, dword [esi + 0x140]
jmp 0x5edeac
lea edx, [esi + 0x140]
mov ecx, dword [esi + 0x134]
cmp dword [esi + 0x138], eax
jb 0x5edec6
mov eax, dword [esi + 0x124]
push edi
push edx
push ecx
push eax
jmp 0x5eded6
push edi
push edx
lea eax, [esi + 0x124]
push ecx
push eax
jmp 0x5eded6
push ebx
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.wininet.dll_HttpSendRequestA]
cmp eax, ebx
jne 0x5edef7
mov byte [esi + 0x186], 1
mov dword [esi + 0x188], 4
jmp 0x5ee04d
mov edi, dword [sym.imp.wininet.dll_HttpQueryInfoA]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
push 0x20000013
push ebp
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], 4
mov dword [esp + 0x30], ebx
call edi
test eax, eax
jne 0x5edf2f
mov byte [esi + 0x187], 1
mov eax, dword [esp + 0x20]
cmp eax, 0x194
jne 0x5edf41
mov ecx, 3
jmp 0x5edf4d
cmp eax, 0xc8
je 0x5edf54
mov ecx, 4
mov eax, esi
call fcn.005ee100
cmp byte [esi + 0x186], bl
jne 0x5ee04d
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
push 0x20000005
push ebp
mov dword [esp + 0x2c], 4
mov dword [esp + 0x30], ebx
call edi
mov dword [esi + 0x17c], ebx
mov dword [esi + 0x180], ebx
mov dword [esp + 0x14], 3
jmp 0x5ee04d
mov eax, 0x10
cmp dword [esi + 0xa8], eax
jb 0x5edfb1
mov edx, dword [esi + 0x94]
jmp 0x5edfb7
lea edx, [esi + 0x94]
cmp dword [esi + 0x8c], eax
jb 0x5edfc4
mov ecx, dword [esi + 0x78]
jmp 0x5edfc7
lea ecx, [esi + 0x78]
cmp dword [esi + 0xc4], eax
jb 0x5edfd7
mov eax, dword [esi + 0xb0]
jmp 0x5edfdd
lea eax, [esi + 0xb0]
push ebx
push 0x4000000
push 3
push edx
mov edx, dword [esp + 0x34]
push ecx
movzx ecx, word [esi + 0xc8]
push ecx
push eax
push edx
call dword [sym.imp.wininet.dll_InternetConnectA]
mov dword [esp + 0x28], eax
cmp eax, ebx
jne 0x5ee00a
mov byte [esi + 0x187], 1
mov dword [esp + 0x14], 2
jmp 0x5ee04d
cmp dword [esi + 0x11c], 0x10
jb 0x5ee025
mov eax, dword [esi + 0x108]
jmp 0x5ee02b
lea eax, [esi + 0x108]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.wininet.dll_InternetOpenA]
mov dword [esp + 0x24], eax
cmp eax, ebx
jne 0x5ee045
mov byte [esi + 0x187], 1
mov dword [esp + 0x14], 1
cmp byte [esi + 0x187], bl
je 0x5edcbc
mov dword [esp + 0x2c], ebp
mov ebp, dword [sym.imp.wininet.dll_InternetCloseHandle]
mov edi, 2
mov eax, dword [esp + edi*4 + 0x24]
cmp eax, ebx
je 0x5ee073
push eax
call ebp
sub edi, 1
jns 0x5ee068
cmp byte [esi + 0x187], bl
je 0x5ee08e
mov ecx, 6
mov eax, esi
call fcn.005ee100
jmp 0x5ee09d
cmp dword [esi + 0x188], 2
jne 0x5ee09d
mov dword [esi + 0x188], ebx
lea edi, [esi + 0x18c]
push edi
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
mov eax, dword [esi + 0x158]
cmp eax, ebx
je 0x5ee0bd
push eax
call fcn.00644dd9
add esp, 4
push edi
mov dword [esi + 0x158], ebx
mov byte [esi + 0x15c], bl
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
mov ecx, dword [esp + 0x450]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x43c]
xor ecx, esp
call fcn.00643db8
add esp, 0x44c
ret