Function at 0x5b4020
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 0x64e05b
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x6a9fa4]
xor eax, esp
mov dword [esp + 0x43c], eax
push ebx
push ebp
push edi
mov eax, dword [0x6a9fa4]
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 0x5b441d
cmp byte [esi + 0x186], bl
jne 0x5b4419
mov eax, dword [esp + 0x14]
sub eax, ebx
je 0x5b43d4
sub eax, 1
je 0x5b435c
sub eax, 1
je 0x5b41bd
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 0x5b40d7
lea ecx, [eax + 0xa]
mov eax, esi
call fcn.005b44c0
jmp 0x5b440d
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x5b40eb
mov byte [esi + 0x186], 1
jmp 0x5b440d
cmp dword [esi + 0x158], ebx
je 0x5b415c
cmp byte [esi + 0x15c], bl
je 0x5b415c
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.006252d0
add esp, 0x10
cmp eax, dword [esp + 0x10]
je 0x5b4141
mov ecx, 0xb
mov eax, esi
call fcn.005b44c0
push edi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x5b440d
mov edx, dword [esi + 0x158]
push edx
call fcn.00628152
add esp, 4
push edi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x5b440d
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.00405590
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esi + 0x160]
mov dword [esp + 0x464], ebx
call fcn.00420020
mov dword [esp + 0x458], 0xffffffff
cmp dword [esp + 0x48], 0x10
jb 0x5b440d
mov edx, dword [esp + 0x34]
push edx
call fcn.0062414c
add esp, 4
jmp 0x5b440d
mov eax, dword [esi + 0x6c]
push 5
lea ecx, [esi + 0x58]
push str.https
push eax
push ebx
mov ebp, 0x400c000
call fcn.004598c0
test eax, eax
jne 0x5b41df
mov ebp, 0x480c000
mov eax, 0x10
cmp dword [esi + 0xe4], eax
jb 0x5b41f4
mov ecx, dword [esi + 0xd0]
jmp 0x5b41fa
lea ecx, [esi + 0xd0]
cmp dword [esi + 0x100], eax
lea edi, [esi + 0xe8]
jb 0x5b420d
mov eax, dword [edi + 4]
jmp 0x5b4210
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 0x5b4234
mov byte [esi + 0x187], 1
jmp 0x5b440d
mov edx, dword [edi + 0x14]
push 4
push str.POST
push edx
push ebx
mov ecx, edi
call fcn.004598c0
test eax, eax
jne 0x5b4292
mov edi, dword [esi + 0x150]
mov eax, 0x10
cmp dword [esi + 0x154], eax
jb 0x5b4266
mov edx, dword [esi + 0x140]
jmp 0x5b426c
lea edx, [esi + 0x140]
cmp dword [esi + 0x138], eax
mov ecx, dword [esi + 0x134]
jb 0x5b4286
mov eax, dword [esi + 0x124]
push edi
push edx
push ecx
push eax
jmp 0x5b4296
push edi
push edx
lea eax, [esi + 0x124]
push ecx
push eax
jmp 0x5b4296
push ebx
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.wininet.dll_HttpSendRequestA]
cmp eax, ebx
jne 0x5b42b7
mov byte [esi + 0x186], 1
mov dword [esi + 0x188], 4
jmp 0x5b440d
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 0x5b42ef
mov byte [esi + 0x187], 1
mov eax, dword [esp + 0x20]
cmp eax, 0x194
jne 0x5b4301
mov ecx, 3
jmp 0x5b430d
cmp eax, 0xc8
je 0x5b4314
mov ecx, 4
mov eax, esi
call fcn.005b44c0
cmp byte [esi + 0x186], bl
jne 0x5b440d
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 0x5b440d
mov eax, 0x10
cmp dword [esi + 0xa8], eax
jb 0x5b4371
mov edx, dword [esi + 0x94]
jmp 0x5b4377
lea edx, [esi + 0x94]
cmp dword [esi + 0x8c], eax
jb 0x5b4384
mov ecx, dword [esi + 0x78]
jmp 0x5b4387
lea ecx, [esi + 0x78]
cmp dword [esi + 0xc4], eax
jb 0x5b4397
mov eax, dword [esi + 0xb0]
jmp 0x5b439d
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 0x5b43ca
mov byte [esi + 0x187], 1
mov dword [esp + 0x14], 2
jmp 0x5b440d
cmp dword [esi + 0x11c], 0x10
jb 0x5b43e5
mov eax, dword [esi + 0x108]
jmp 0x5b43eb
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 0x5b4405
mov byte [esi + 0x187], 1
mov dword [esp + 0x14], 1
cmp byte [esi + 0x187], bl
je 0x5b407c
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 0x5b4433
push eax
call ebp
sub edi, 1
jns 0x5b4428
cmp byte [esi + 0x187], bl
je 0x5b444e
mov ecx, 6
mov eax, esi
call fcn.005b44c0
jmp 0x5b445d
cmp dword [esi + 0x188], 2
jne 0x5b445d
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 0x5b447d
push eax
call fcn.00624e3e
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.00626d59
add esp, 0x44c
ret