Function at 0x403371
Capabilities:
Create http request
Delete file
Download and write a file
Get http content length
Print debug messages
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov eax, 0x417698
call fcn.00407c70
push ecx
mov eax, 0x2194
call fcn.00407db0
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
xor ebx, ebx
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x11a3]
mov byte [ebp - 0x11a4], bl
mov dword [ebp - 4], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x41e944]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x14]
mov byte [ebp - 4], 4
cmp eax, ebx
mov dword [ebp - 0x48], eax
jle 0x4037da
push ebx
push ebx
push ebx
push ebx
push str.HttpDownload
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esi + 4], eax
jne 0x40340f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push 0x41e184
push eax
call fcn.0040fb21
add esp, 0xc
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor esi, esi
jmp 0x4037dd
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x48]
jge 0x4037b8
push eax
lea eax, [ebp - 0x3c]
lea ecx, [esi + 0xc]
push eax
call fcn.0040382b
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 5
call fcn.00410618
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 6
call fcn.00410522
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 5
call fcn.00410479
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.00410479
mov edi, dword [ebp - 0x24]
push ebx
lea eax, [ebp - 0x11a4]
push 2
push eax
mov byte [ebp - 4], 7
call fcn.00407d30
pop ecx
push eax
lea eax, [ebp - 0x11a4]
push eax
push edi
push dword [esi + 4]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edx, eax
cmp edx, ebx
mov dword [esi + 8], edx
jne 0x403512
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push 0x41e184
push eax
call fcn.0040fb21
add esp, 0xc
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov byte [ebp - 4], 4
jmp 0x4037b0
push 7
xor eax, eax
pop ecx
lea edi, [ebp - 0x7f]
mov byte [ebp - 0x80], bl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 0x80]
push eax
push 0x13
push edx
mov dword [ebp - 0x28], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x403581
push dword [ebp - 0x18]
lea eax, [ebp - 0x5c]
lea ecx, [esi + 0xc]
push eax
call fcn.0040382b
push dword [eax]
lea eax, [ebp - 0x80]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x14]
push 0x41e154
push eax
call fcn.0040fb21
add esp, 0x10
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x5c]
call fcn.00410479
jmp 0x403639
lea eax, [ebp - 0x80]
push eax
call fcn.00407d1a
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 2
je 0x4035c9
push dword [ebp - 0x18]
lea eax, [ebp - 0x50]
lea ecx, [esi + 0xc]
push eax
call fcn.0040382b
push dword [eax]
lea eax, [ebp - 0x80]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x14]
push 0x41e154
push eax
call fcn.0040fb21
add esp, 0x10
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x50]
jmp 0x403577
push 7
xor eax, eax
pop ecx
lea edi, [ebp - 0x9f]
mov byte [ebp - 0xa0], bl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x28]
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push eax
lea eax, [ebp - 0xa0]
push eax
push 0x14
push dword [esi + 8]
mov dword [ebp - 0x28], 0x20
call edi
test eax, eax
je 0x403621
lea eax, [ebp - 0x58]
push ebx
push eax
lea eax, [ebp - 0x20]
push eax
push 0x20000005
push dword [esi + 8]
mov dword [ebp - 0x58], 4
call edi
test eax, eax
jne 0x403647
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push 0x41e13c
push eax
call fcn.0040fb21
add esp, 0xc
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x4037b0
mov edi, 0x104
lea eax, [ebp - 0x1a4]
push edi
push ebx
push eax
call fcn.00407de0
lea eax, [ebp - 0x1a4]
push edi
push eax
call fcn.00404fe3
add esp, 0x14
lea eax, [ebp - 0x1a4]
lea ecx, [ebp - 0x1c]
push eax
call fcn.00410572
push 0x41e138
lea ecx, [ebp - 0x1c]
call fcn.004106dd
push dword [ebp - 0x18]
lea eax, [ebp - 0x4c]
lea ecx, [esi + 0xc]
push eax
call fcn.0040382b
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xb
call fcn.00410704
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 4
call fcn.00410479
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x30], eax
je 0x4037b0
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x21a3]
mov byte [ebp - 0x21a4], bl
rep stosd dword es:[edi], eax
cmp dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], ebx
stosw word es:[edi], ax
stosb byte es:[edi], al
jbe 0x403730
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x21a4]
push 0x1000
push eax
push dword [esi + 8]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x403730
lea eax, [ebp - 0x60]
push ebx
push eax
lea eax, [ebp - 0x21a4]
push dword [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x2c]
sub dword [ebp - 0x20], eax
jne 0x4036f3
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], ebx
jbe 0x403776
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x18]
lea eax, [ebp - 0x40]
lea ecx, [esi + 0xc]
push eax
call fcn.0040382b
push dword [eax]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xc
push 0x41e12c
push eax
call fcn.0040fb21
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
jmp 0x4037a5
jne 0x4037aa
push dword [ebp - 0x18]
lea eax, [ebp - 0x44]
lea ecx, [esi + 0xc]
push eax
call fcn.0040382b
push dword [eax]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xd
push 0x41e120
push eax
call fcn.0040fb21
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x44]
call fcn.00410479
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x34], eax
inc dword [ebp - 0x18]
jmp 0x403412
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x4037c9
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x4037da
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 4], ebx
push 1
pop esi
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00410479
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.00410479
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00410479
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.00410479
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00410479
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8