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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45030b
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x24fc
call fcn.00442eb0
mov eax, dword [0x46a2c8]
xor eax, esp
mov dword [esp + 0x24f8], eax
push ebx
push esi
push edi
mov eax, dword [0x46a2c8]
xor eax, esp
push eax
lea eax, [esp + 0x2510]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
and dword [esp + 0x1c], 0
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x68], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x14]
mov edi, edx
mov dword [esp + 0x64], eax
mov eax, dword [edi]
push 0xffffffffffffffff
mov ebx, ecx
push eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], edi
call esi
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
je 0x40bbd0
xor eax, eax
mov ecx, dword [esp + 0x2510]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x24f8]
xor ecx, esp
call fcn.004312e6
mov esp, ebp
pop ebp
ret 0x14
call fcn.0040b629
test eax, eax
jne 0x40bbde
push 4
pop eax
jmp 0x40bbaa
mov eax, dword [edi]
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
jne 0x40bba8
call fcn.0040b656
test eax, eax
jne 0x40bbfa
push 5
jmp 0x40bbdb
mov edi, dword [edi]
push 0xffffffffffffffff
push edi
call esi
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
jne 0x40bba8
push ecx
mov eax, esp
mov dword [esp + 0x28], esp
push str.R0VU
push eax
call fcn.0040890f
lea eax, [esp + 0x48]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
and dword [esp + 0x2518], 0
lea eax, [ebx + 4]
mov dword [esp + 0x24], eax
mov eax, dword [eax]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x40bcfa
push ecx
mov eax, esp
mov dword [esp + 0x40], esp
push str.UE9TVA
push eax
call fcn.0040890f
lea eax, [esp + 0x34]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
lea edi, [esp + 0x44]
mov byte [esp + 0x2518], 1
call fcn.0040c54a
mov byte [esp + 0x2518], 0
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.0040117e
push ecx
mov eax, esp
mov dword [esp + 0x40], esp
push str.dGV4dC94bWw
push eax
call fcn.0040890f
lea eax, [esp + 0x1c]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
push eax
push ecx
mov byte [esp + 0x2520], 2
mov eax, esp
mov dword [esp + 0x44], esp
push str.Y29udGVudC10eXBl
push eax
call fcn.0040890f
lea eax, [esp + 0x38]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
push eax
push ebx
mov byte [esp + 0x2524], 3
call fcn.0040b4f5
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.0040117e
mov byte [esp + 0x2518], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.0040117e
mov eax, dword [0x46c8c4]
mov ecx, 0x46c8c4
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
mov byte [esp + 0x2518], 4
push dword [eax]
push 0
push ecx
mov eax, esp
mov dword [esp + 0x48], esp
push str.Ynl0ZXM9JWQtJWQ
push eax
call fcn.0040890f
lea eax, [esp + 0x24]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
mov byte [esp + 0x2520], 5
push dword [eax]
lea eax, [esp + 0x3c]
call fcn.0040d841
mov byte [esp + 0x2524], 4
mov eax, dword [esp + 0x24]
add esp, 0xc
add eax, 0xfffffff0
call fcn.0040117e
lea eax, [esp + 0x30]
push eax
push ecx
mov eax, esp
mov dword [esp + 0x44], esp
push str.UmFuZ2U
push eax
call fcn.0040890f
lea eax, [esp + 0x20]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
push eax
push ebx
mov byte [esp + 0x2524], 6
call fcn.0040b4f5
mov byte [esp + 0x2518], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.0040117e
lea eax, [esp + 0x4c]
add ebx, 0x30
push eax
call fcn.0040b2d5
mov eax, dword [esp + 0x34]
mov byte [esp + 0x2518], 7
mov eax, dword [eax]
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [ebp + 0x18]
xor ebx, ebx
cmp dword [eax], ebx
je 0x40be00
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
call fcn.0040117e
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.0040117e
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
call fcn.0040117e
mov eax, ebx
jmp 0x40bbaa
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 0x68]
push ebx
push ebx
push ebx
push ebx
push ecx
lea esi, [eax + 0xc]
call dword [sym.imp.WININET.dll_InternetOpenW]
push eax
call fcn.0040c47b
cmp dword [esi], ebx
jne 0x40be24
push 6
pop ebx
jmp 0x40bdd5
lea eax, [esp + 0x94]
call fcn.0040a488
push 4
pop eax
push 0x50
pop ecx
push eax
push dword [0x459ae8]
mov dword [esp + 0x24f0], eax
lea eax, [esp + 0x9c]
push 0x21
push eax
mov dword [esp + 0x24f4], 2
mov word [esp + 0x24f0], cx
call fcn.00431cda
push eax
call fcn.00401053
mov eax, dword [esp + 0x34]
mov edi, dword [eax]
add esp, 0x14
lea eax, [esp + 0x94]
call fcn.0040a488
lea eax, [esp + 0x94]
push eax
mov ecx, edi
call fcn.0040a096
cmp eax, ebx
jne 0x40be98
push 8
jmp 0x40be21
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [ebp + 0x18]
cmp dword [edi], ebx
jne 0x40bdd5
mov esi, dword [esi]
push ebx
push ebx
push 3
mov eax, 0x454ad8
push eax
push eax
push dword [esp + 0x24f4]
lea eax, [esp + 0xee]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esp + 0x20], eax
mov byte [esp + 0x2518], 8
cmp eax, ebx
jne 0x40bef5
lea esi, [esp + 0x20]
call fcn.0040c46a
push 7
jmp 0x40be21
xor ecx, ecx
mov eax, 0x1bb
cmp word [esp + 0x24e0], ax
lea eax, [esp + 0x4dc]
setne cl
push eax
lea eax, [esp + 0x2c]
push eax
dec ecx
and ecx, 0x800000
or ecx, 0x84403300
mov dword [esp + 0x20], ecx
call fcn.0040890f
lea eax, [esp + 0x14de]
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x2520], 9
call fcn.0040d088
cmp dword [edi], ebx
je 0x40bf62
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x20]
call fcn.0040c46a
jmp 0x40bdd5
mov eax, dword [esp + 0x38]
cmp dword [eax + 0x70], ebx
je 0x40bfa2
push ecx
mov eax, esp
mov dword [esp + 0x40], esp
push str.SFRUUC8xLjE
push eax
call fcn.0040890f
lea eax, [esp + 0x40]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
mov byte [esp + 0x2518], 0xa
mov esi, eax
mov dword [esp + 0x1c], 1
call fcn.00408a26
jmp 0x40bfa4
xor eax, eax
push ebx
push dword [esp + 0x1c]
push ebx
push ebx
push eax
push dword [esp + 0x3c]
push dword [esp + 0x5c]
push dword [esp + 0x3c]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x2518], 0xc
test byte [esp + 0x1c], 1
je 0x40bfe2
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.0040117e
cmp edi, ebx
jne 0x40c00b
lea esi, [esp + 0x18]
call fcn.0040c46a
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x20]
call fcn.0040c46a
push 9
jmp 0x40be21
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0x18]
cmp dword [eax], ebx
je 0x40c02f
lea esi, [esp + 0x18]
call fcn.0040c46a
jmp 0x40bf48
push ecx
mov eax, esp
mov dword [esp + 0x20], esp
push str.R0VU
push eax
call fcn.0040890f
lea eax, [esp + 0x20]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
mov byte [esp + 0x2518], 0xd
mov eax, dword [eax]
lea ecx, [esp + 0x44]
push ecx
mov ecx, eax
call fcn.0040cbad
neg eax
sbb al, al
inc al
mov byte [esp + 0x17], al
mov byte [esp + 0x2518], 0xc
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
call fcn.0040117e
cmp byte [esp + 0x17], bl
je 0x40c09d
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax - 0xc]
push ebx
push ebx
push ecx
push eax
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov esi, eax
jmp 0x40c110
push dword [esp + 0x24]
lea eax, [esp + 0x20]
push eax
call fcn.0040f954
pop ecx
pop ecx
mov byte [esp + 0x2518], 0xe
lea eax, [esp + 0x1c]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax - 0xc]
lea esi, [esp + 0x1c]
mov dword [esp + 0x58], eax
call fcn.0040c533
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax - 0xc]
push eax
push dword [esp + 0x58]
push edx
push ecx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
lea ecx, [esp + 0x50]
mov esi, eax
call fcn.0040ca2c
mov byte [esp + 0x2518], 0xc
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
call fcn.0040117e
cmp esi, ebx
jne 0x40c139
lea esi, [esp + 0x18]
call fcn.0040c46a
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x20]
call fcn.0040c46a
push 0xa
jmp 0x40be21
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0x18]
cmp dword [eax], ebx
jne 0x40c021
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x2c], edi
call fcn.0040b06e
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x40]
mov byte [esp + 0x251c], 0xf
push eax
mov dword [esp + 0x2c], edi
call fcn.0040af75
mov edi, dword [esp + 0x38]
add edi, 8
mov byte [esp + 0x2518], 0x10
call fcn.0040c54a
mov byte [esp + 0x2518], 0xf
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.0040117e
push ecx
mov eax, esp
mov dword [esp + 0x28], esp
push str.MjA2
push eax
call fcn.0040890f
lea eax, [esp + 0x28]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
mov byte [esp + 0x2518], 0x11
push dword [eax]
push edi
call fcn.0040c5a1
test eax, eax
mov byte [esp + 0x2518], 0xf
mov eax, dword [esp + 0x24]
setne byte [esp + 0x17]
add eax, 0xfffffff0
call fcn.0040117e
cmp byte [esp + 0x17], bl
je 0x40c27e
push ecx
mov eax, esp
mov dword [esp + 0x28], esp
push str.MjAw
push eax
call fcn.0040890f
lea eax, [esp + 0x28]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
mov byte [esp + 0x2518], 0x12
push dword [eax]
push edi
call fcn.0040c5a1
neg eax
sbb al, al
inc al
mov byte [esp + 0x17], al
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.0040117e
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x18]
call fcn.0040c46a
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x20]
call fcn.0040c46a
cmp byte [esp + 0x17], bl
je 0x40c277
push 0x10
jmp 0x40be21
push 0xb
jmp 0x40be21
mov esi, dword [esp + 0x38]
add esi, 0x10
push esi
lea eax, [esp + 0x30]
push eax
call fcn.0040b0db
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0x18]
cmp dword [eax], ebx
je 0x40c2b6
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.0040117e
jmp 0x40c021
push ecx
mov eax, esp
mov dword [esp + 0x28], esp
push str.Y29udGVudC1sZW5ndGg
push eax
call fcn.0040890f
lea eax, [esp + 0x28]
push eax
call fcn.0040f5fc
pop ecx
pop ecx
push eax
lea eax, [esp + 0x40]
push eax
push esi
call fcn.0040c90f
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.0040117e
mov esi, 0x1000
push esi
call fcn.004303a4
pop ecx
mov edx, eax
push 9
pop ecx
xor eax, eax
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
push dword [eax]
mov dword [esp + 0x24], edx
mov dword [esp + 0x74], 0x28
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [ebp + 0x18]
cmp dword [edi], ebx
je 0x40c343
push dword [esp + 0x1c]
call fcn.004312db
pop ecx
jmp 0x40c2a5
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [edi], ebx
jne 0x40c334
push ebx
push 4
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x24]
call dword [sym.imp.WININET.dll_InternetReadFileExW]
mov edx, dword [esp + 0x84]
mov dword [esp + 0x38], edx
cmp eax, ebx
je 0x40c3f4
mov esi, dword [esp + 0x64]
cmp edx, ebx
jbe 0x40c3d7
mov eax, dword [esi]
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx]
sub ecx, eax
mov dword [esp + 0x58], eax
xor eax, eax
lea edi, [esp + 0x60]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x5c], ebx
stosd dword es:[edi], eax
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x6c]
push ebx
cmp ecx, edx
jae 0x40c3b0
push ecx
jmp 0x40c3b1
push edx
push dword [esp + 0x28]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40c3c8
call fcn.00409e43
jmp 0x40c3ca
xor eax, eax
cmp eax, ebx
jl 0x40c42f
mov eax, dword [esp + 0x38]
add dword [esi], eax
mov edi, dword [ebp + 0x18]
mov eax, dword [esi]
mov ecx, dword [esp + 0x48]
cmp eax, dword [ecx]
jae 0x40c334
cmp dword [esp + 0x38], ebx
jbe 0x40c334
jmp 0x40c330
push dword [esp + 0x1c]
call fcn.004312db
mov eax, dword [esp + 0x30]
pop ecx
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x18]
call fcn.0040c46a
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x20]
call fcn.0040c46a
push 0xc
jmp 0x40be21
push dword [esp + 0x1c]
call fcn.004312db
mov eax, dword [esp + 0x30]
pop ecx
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x18]
call fcn.0040c46a
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.0040117e
lea esi, [esp + 0x20]
call fcn.0040c46a
push 0xe
jmp 0x40be21