Function at 0x5adcd0
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 0x64145b
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x699fe8]
xor eax, esp
mov dword [esp + 0x43c], eax
push ebx
push ebp
push edi
mov eax, dword [0x699fe8]
xor eax, esp
push eax
lea eax, [esp + 0x450]
mov dword fs:[0], eax
xor eax, eax
xor ebx, ebx
cmp byte [esi + 0x187], bl
mov ebp, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], ebx
jne 0x5ae0cd
cmp byte [esi + 0x186], bl
jne 0x5ae0c9
mov eax, dword [esp + 0x14]
sub eax, ebx
je 0x5ae084
sub eax, 1
je 0x5ae00c
sub eax, 1
je 0x5ade6d
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 0x5add87
lea ecx, [eax + 0xa]
mov eax, esi
call fcn.005ae170
jmp 0x5ae0bd
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x5add9b
mov byte [esi + 0x186], 1
jmp 0x5ae0bd
cmp dword [esi + 0x158], ebx
je 0x5ade0c
cmp byte [esi + 0x15c], bl
je 0x5ade0c
lea edi, [esi + 0x18c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x158]
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x54]
push 1
push ecx
call fcn.0061d3c8
add esp, 0x10
cmp eax, dword [esp + 0x10]
je 0x5addf1
mov ecx, 0xb
mov eax, esi
call fcn.005ae170
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x5ae0bd
mov edx, dword [esi + 0x158]
push edx
call fcn.0061fe72
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x5ae0bd
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.00404330
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esi + 0x160]
mov dword [esp + 0x464], ebx
call fcn.0041dc70
mov dword [esp + 0x458], 0xffffffff
cmp dword [esp + 0x48], 0x10
jb 0x5ae0bd
mov edx, dword [esp + 0x34]
push edx
call fcn.0061c19a
add esp, 4
jmp 0x5ae0bd
mov eax, dword [esi + 0x6c]
push 5
lea ecx, [esi + 0x58]
push str.https
push eax
push ebx
mov ebp, 0x400c000
call fcn.004565a0
test eax, eax
jne 0x5ade8f
mov ebp, 0x480c000
mov eax, 0x10
cmp dword [esi + 0xe4], eax
jb 0x5adea4
mov ecx, dword [esi + 0xd0]
jmp 0x5adeaa
lea ecx, [esi + 0xd0]
cmp dword [esi + 0x100], eax
lea edi, [esi + 0xe8]
jb 0x5adebd
mov eax, dword [edi + 4]
jmp 0x5adec0
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 0x5adee4
mov byte [esi + 0x187], 1
jmp 0x5ae0bd
mov edx, dword [edi + 0x14]
push 4
push str.POST
push edx
push ebx
mov ecx, edi
call fcn.004565a0
test eax, eax
jne 0x5adf42
mov edi, dword [esi + 0x150]
mov eax, 0x10
cmp dword [esi + 0x154], eax
jb 0x5adf16
mov edx, dword [esi + 0x140]
jmp 0x5adf1c
lea edx, [esi + 0x140]
cmp dword [esi + 0x138], eax
mov ecx, dword [esi + 0x134]
jb 0x5adf36
mov eax, dword [esi + 0x124]
push edi
push edx
push ecx
push eax
jmp 0x5adf46
push edi
push edx
lea eax, [esi + 0x124]
push ecx
push eax
jmp 0x5adf46
push ebx
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, ebx
jne 0x5adf67
mov byte [esi + 0x186], 1
mov dword [esi + 0x188], 4
jmp 0x5ae0bd
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 0x5adf9f
mov byte [esi + 0x187], 1
mov eax, dword [esp + 0x20]
cmp eax, 0x194
jne 0x5adfb1
mov ecx, 3
jmp 0x5adfbd
cmp eax, 0xc8
je 0x5adfc4
mov ecx, 4
mov eax, esi
call fcn.005ae170
cmp byte [esi + 0x186], bl
jne 0x5ae0bd
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 0x5ae0bd
mov eax, 0x10
cmp dword [esi + 0xa8], eax
jb 0x5ae021
mov edx, dword [esi + 0x94]
jmp 0x5ae027
lea edx, [esi + 0x94]
cmp dword [esi + 0x8c], eax
jb 0x5ae034
mov ecx, dword [esi + 0x78]
jmp 0x5ae037
lea ecx, [esi + 0x78]
cmp dword [esi + 0xc4], eax
jb 0x5ae047
mov eax, dword [esi + 0xb0]
jmp 0x5ae04d
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]
cmp eax, ebx
mov dword [esp + 0x28], eax
jne 0x5ae07a
mov byte [esi + 0x187], 1
mov dword [esp + 0x14], 2
jmp 0x5ae0bd
cmp dword [esi + 0x11c], 0x10
jb 0x5ae095
mov eax, dword [esi + 0x108]
jmp 0x5ae09b
lea eax, [esi + 0x108]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esp + 0x24], eax
jne 0x5ae0b5
mov byte [esi + 0x187], 1
mov dword [esp + 0x14], 1
cmp byte [esi + 0x187], bl
je 0x5add2c
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 0x5ae0e3
push eax
call ebp
sub edi, 1
jns 0x5ae0d8
cmp byte [esi + 0x187], bl
je 0x5ae0fe
mov ecx, 6
mov eax, esi
call fcn.005ae170
jmp 0x5ae10d
cmp dword [esi + 0x188], 2
jne 0x5ae10d
mov dword [esi + 0x188], ebx
lea edi, [esi + 0x18c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x158]
cmp eax, ebx
je 0x5ae12d
push eax
call fcn.0061cf36
add esp, 4
push edi
mov dword [esi + 0x158], ebx
mov byte [esi + 0x15c], bl
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
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.0061efd1
add esp, 0x44c
ret