Function at 0x40363c
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
mov eax, edx
push ebx
sub esp, 0xac
mov dword [ebp - 0x84], edx
call fcn.00404774
mov eax, dword [ebp - 0x84]
mov edx, 0x44
call fcn.0040462c
mov dword [ebp - 0x7c], eax
inc eax
jne 0x4036ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [eax - 2]
cmp edx, 1
setbe cl
cmp eax, 0x15
sete dl
or cl, dl
jne 0x40368f
cmp eax, 0x7b
jne 0x403948
mov eax, dword [ebp - 0x84]
call fcn.004043e8
test eax, eax
jne 0x403948
mov eax, dword [ebp - 0x84]
mov edx, 0x44
call fcn.0040462c
mov dword [ebp - 0x7c], eax
jmp 0x403948
xor ebx, ebx
lea edi, [ebp - 0x64]
mov ecx, 3
xor edx, edx
mov eax, ebx
rep stosd dword es:[edi], eax
mov dword [esp], 0xffffffff
mov ecx, esi
call fcn.00405510
mov dword [ebp - 0x8c], eax
test eax, eax
jne 0x4036f8
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x88], 0
jmp 0x4038ec
mov edx, 0x4000
lea eax, [ebp - 0x64]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x64], 0
call fcn.004034e4
test eax, eax
je 0x4036e2
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x4081b6
call dword [sym.imp.WININET.DLL_InternetOpenW]
sub esp, 0x14
mov dword [ebp - 0x88], eax
test eax, eax
je 0x4036e2
mov edx, 8
mov ecx, esi
mov eax, str.https:__
call fcn.004048dc
mov edx, 0x800000
test eax, eax
je 0x403778
cmp eax, 0xfffffff7
cmovne edx, ebx
mov eax, dword [ebp - 0x8c]
mov dword [esp + 0x10], edx
or ebx, 0xffffffff
mov dword [esp + 0x14], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x88]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.WININET.DLL_InternetOpenUrlW]
sub esp, 0x18
mov dword [ebp - 0x80], eax
test eax, eax
je 0x4038f3
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], 0x40
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x80]
mov dword [esp + 0x10], 0
mov dword [esp + 4], 5
mov dword [esp], eax
call dword [sym.imp.WININET.DLL_HttpQueryInfoA]
sub esp, 0x14
test eax, eax
je 0x40386b
mov eax, dword [ebp - 0x70]
xor ecx, ecx
xor edx, edx
mov edi, 0xa
mov dword [ebp - 0x90], eax
xor eax, eax
cmp dword [ebp - 0x90], ecx
je 0x403849
mov bl, byte [ebp + ecx - 0x58]
sub ebx, 0x30
cmp bl, 9
ja 0x403849
imul esi, edx, 0xa
mul edi
mov dword [ebp - 0x94], edx
xor edx, edx
mov dword [ebp - 0x98], eax
movzx eax, bl
add dword [ebp - 0x94], esi
add eax, dword [ebp - 0x98]
adc edx, dword [ebp - 0x94]
inc ecx
jmp 0x40380a
lea ebx, [ecx - 1]
cmp ebx, 0x14
mov ebx, 0
cmovae ecx, ebx
cmp dword [ebp - 0x90], ecx
jne 0x40386b
mov ecx, dword [0x407064]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], edx
xor esi, esi
xor edi, edi
lea eax, [ebp - 0x6c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x80]
mov dword [esp], eax
call dword [sym.imp.WININET.DLL_InternetReadFile]
sub esp, 0x10
test eax, eax
je 0x4038ec
dec eax
mov edx, dword [ebp - 0x6c]
jne 0x4038a1
test edx, edx
je 0x4038f1
lea eax, [ebp - 0x68]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x7c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
or edx, 0xffffffff
sub esp, 0x14
test eax, eax
je 0x4038d4
mov edx, dword [ebp - 0x68]
cmp dword [ebp - 0x6c], edx
jne 0x4038ec
mov eax, edx
xor edx, edx
add esi, eax
adc edi, edx
mov eax, esi
mov edx, edi
call fcn.00404100
jmp 0x40386f
or ebx, 0xffffffff
jmp 0x4038f3
xor ebx, ebx
lea eax, [ebp - 0x64]
call fcn.0040349c
mov eax, dword [ebp - 0x8c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [0x407058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x80]
mov esi, dword [sym.imp.WININET.DLL_InternetCloseHandle]
sub esp, 0xc
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x88]
push edx
mov dword [esp], eax
call esi
push ecx
test ebx, ebx
jne 0x403948
xor eax, eax
xor edx, edx
call fcn.00404100
jmp 0x40396d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jne 0x403957
or ebx, 0xffffffff
mov eax, dword [ebp - 0x84]
call fcn.00404774
call fcn.004041c4
cmp dword [ebp - 0x7c], 0xffffffff
je 0x40397a
mov eax, dword [ebp - 0x7c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret