Function at 0x408e34
Capabilities:
Check http status code
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
push ebx
mov ebx, eax
mov eax, edx
sub esp, 0x6c
mov dword [ebp - 0x40], edx
call fcn.00409f00
mov eax, dword [ebp - 0x40]
mov edx, 0x44
call fcn.00409db8
mov dword [ebp - 0x3c], eax
inc eax
jne 0x408ea3
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 0x408e7e
cmp eax, 0x7b
jne 0x409103
mov eax, dword [ebp - 0x40]
call fcn.00409b84
test eax, eax
jne 0x409103
mov eax, dword [ebp - 0x40]
mov edx, 0x44
call fcn.00409db8
mov dword [ebp - 0x3c], eax
jmp 0x409103
xor esi, esi
lea edi, [ebp - 0x24]
mov ecx, 3
xor edx, edx
mov eax, esi
rep stosd dword es:[edi], eax
mov dword [esp], 0xffffffff
mov ecx, ebx
call fcn.0040abb8
mov dword [ebp - 0x44], eax
test eax, eax
jne 0x408ed1
xor esi, esi
xor edi, edi
jmp 0x4090b3
mov edx, 0x4000
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 0
call fcn.00408cd8
test eax, eax
je 0x408ec8
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x40e268
call dword [sym.imp.WININET.DLL_InternetOpenW]
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x408ec8
mov edx, 8
mov ecx, ebx
mov eax, str.https:__
call fcn.0040a058
mov edx, 0x800000
test eax, eax
je 0x408f4d
cmp eax, 0xfffffff7
cmovne edx, esi
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x10], edx
or ebx, 0xffffffff
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.WININET.DLL_InternetOpenUrlW]
sub esp, 0x18
mov esi, eax
test eax, eax
je 0x4090ba
mov edx, dword [sym.imp.WININET.DLL_HttpQueryInfoA]
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x38]
mov dword [esp], esi
mov dword [ebp - 0x34], 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20000013
mov dword [ebp - 0x50], edx
call edx
sub esp, 0x14
test eax, eax
je 0x4090ba
cmp dword [ebp - 0x34], 4
jne 0x4090ba
cmp dword [ebp - 0x38], 0xc8
jne 0x4090ba
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x30]
mov dword [esp], esi
mov edx, dword [ebp - 0x50]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20000005
call edx
sub esp, 0x14
test eax, eax
je 0x409027
cmp dword [ebp - 0x34], 4
jne 0x409027
mov eax, dword [0x40d084]
test eax, eax
je 0x409027
mov ecx, dword [ebp - 0x30]
mov dword [eax + 0x14], 0
mov dword [eax + 0x10], ecx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
lea eax, [ebp - 0x2c]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
call dword [sym.imp.WININET.DLL_InternetReadFile]
sub esp, 0x10
test eax, eax
je 0x4090b3
dec eax
mov edx, dword [ebp - 0x2c]
jne 0x409064
test edx, edx
je 0x4090b8
lea eax, [ebp - 0x28]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, eax
sub esp, 0x14
or eax, 0xffffffff
test edx, edx
je 0x409099
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], eax
jne 0x4090b3
xor edx, edx
add dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
adc dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x4c]
call fcn.004098b4
jmp 0x409035
or ebx, 0xffffffff
jmp 0x4090ba
xor ebx, ebx
lea eax, [ebp - 0x24]
call fcn.00408c90
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [0x40d078]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
sub esp, 0xc
mov dword [esp], esi
mov esi, dword [sym.imp.WININET.DLL_InternetCloseHandle]
call esi
push edx
mov dword [esp], edi
call esi
push ecx
test ebx, ebx
jne 0x409103
xor eax, eax
xor edx, edx
call fcn.004098b4
jmp 0x40912a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jne 0x409112
or ebx, 0xffffffff
mov eax, dword [ebp - 0x40]
call fcn.00409f00
or eax, 0xffffffff
mov edx, eax
call fcn.004098b4
cmp dword [ebp - 0x3c], 0xffffffff
je 0x409137
mov eax, dword [ebp - 0x3c]
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