Function at 0x10007050
Capabilities:
Connect to http server
Create http request
Download and write a file
Get http content length
Parse url
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 0xffffffffffffffff
push 0x10020730
mov eax, dword fs:[0]
push eax
mov eax, 0x12ac
call fcn.1000f410
mov eax, dword [0x1002e678]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 8]
push 0
lea eax, [ebp + 8]
cmp esi, 0x10
cmovae eax, ebx
push 0x10021636
push eax
mov dword [ebp - 4], 1
call fcn.10007cf0
add esp, 0xc
test eax, eax
jne 0x100070ba
cmp dword [ebp + 0x18], eax
setne al
test eax, eax
je 0x10007599
cmp dword [ebp + 0x34], 0x10
push 0
lea eax, [ebp + 0x20]
cmovae eax, dword [ebp + 0x20]
push 0x10021636
push eax
call fcn.10007cf0
add esp, 0xc
test eax, eax
jne 0x100070e7
cmp dword [ebp + 0x30], eax
setne al
test eax, eax
je 0x10007599
xor eax, eax
push 0xff
mov dword [ebp - 0x12ac], eax
mov dword [ebp - 0x12b0], eax
xor edi, edi
mov dword [ebp - 0x1260], eax
mov dword [ebp - 0x1268], eax
mov dword [ebp - 0x125c], eax
mov byte [ebp - 0x210], al
lea eax, [ebp - 0x20f]
push edi
push eax
mov dword [ebp - 0x12b4], 0
mov dword [ebp - 0x12b8], 0
mov dword [ebp - 0x1264], 4
call fcn.1000fc30
push 0x7f
lea eax, [ebp - 0x10f]
push edi
push eax
mov byte [ebp - 0x110], 0
call fcn.1000fc30
push 0x7f
lea eax, [ebp - 0x8f]
push edi
push eax
mov byte [ebp - 0x90], 0
call fcn.1000fc30
push 0x823
lea eax, [ebp - 0x1257]
push edi
push eax
mov byte [ebp - 0x1258], 0
call fcn.1000fc30
push 0x823
lea eax, [ebp - 0xa33]
push edi
push eax
mov byte [ebp - 0xa34], 0
call fcn.1000fc30
push 0x38
lea eax, [ebp - 0x12a0]
push edi
push eax
call fcn.1000fc30
lea eax, [ebp - 0x210]
mov dword [ebp - 0x1294], eax
add esp, 0x48
lea eax, [ebp - 0x110]
mov dword [ebp - 0x1288], eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x1280], eax
lea ecx, [ebp - 0x12a4]
push ecx
lea eax, [ebp - 0x1258]
mov dword [ebp - 0x1278], eax
push edi
lea eax, [ebp + 8]
cmp esi, 0x10
cmovae eax, ebx
push edi
push eax
mov dword [ebp - 0x12a4], 0x3c
mov dword [ebp - 0x1290], pe_nt_image_headers32
mov dword [ebp - 0x1284], 0x80
mov dword [ebp - 0x127c], 0x80
mov dword [ebp - 0x1274], 0x824
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x1000752a
cmp dword [ebp - 0x1298], 3
jne 0x1000752a
push edi
push edi
push edi
push edi
push str.download
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x12b4], eax
test eax, eax
jne 0x10007270
xor esi, esi
call fcn.100075f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DownloadUrl_InternetOpenA_error_:_d
jmp 0x1000753d
push 0
push 0
push 3
lea ecx, [ebp - 0x90]
push ecx
lea ecx, [ebp - 0x110]
push ecx
push dword [ebp - 0x128c]
lea ecx, [ebp - 0x210]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
mov dword [ebp - 0x12b8], ebx
test ebx, ebx
jne 0x100072bc
xor esi, esi
call fcn.100075f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DownloadUrl_InternetConnectA_error_:_d
jmp 0x1000753d
cmp dword [ebp - 0x1274], edi
je 0x100072e0
mov ecx, dword [ebp - 0x1278]
lea edx, [ebp - 0xa34]
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x100072d2
jmp 0x100072ec
mov eax, 0x2f
mov word [ebp - 0xa34], ax
push 0
push SysReAllocString
push 0
push 0x10021636
push str.HTTP_1.1
lea eax, [ebp - 0xa34]
push eax
push 0x10023a30
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
push 0xa
push eax
mov dword [ebp - 0x12ac], eax
call fcn.10007980
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000733f
call fcn.100075f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10023a38
jmp 0x1000753d
push 0
lea eax, [ebp - 0x1264]
push eax
lea eax, [ebp - 0x125c]
push eax
mov eax, dword [ebp - 0x12ac]
push 0x20000005
push eax
mov dword [ebp - 0x125c], edi
mov dword [ebp - 0x1264], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x1000739a
cmp dword [ebp - 0x125c], 0x3e800000
jbe 0x1000739a
xor esi, esi
call fcn.100075f0
push 0x10023a58
call fcn.10006a90
add esp, 4
jmp 0x10007545
call fcn.100075f0
push dword [ebp - 0x125c]
push dword [ebp - 0x1278]
push str.DownloadUrl_file:_s_byte:_d
call fcn.10006a90
add esp, 0xc
lea eax, [ebp - 0xa34]
push 0
push SysReAllocString
push 0
push 0x10021636
push str.HTTP_1.1
push eax
push 0x10023a8c
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
push 0xa
push ebx
mov dword [ebp - 0x12a8], ebx
call fcn.10007980
mov esi, eax
add esp, 8
test esi, esi
je 0x10007547
cmp dword [ebp + 0x34], 0x10
push 0
push 0x80
push 2
push 0
push 1
lea ecx, [ebp + 0x20]
cmovae ecx, dword [ebp + 0x20]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x12b0], esi
cmp esi, 0xffffffff
jne 0x1000744c
xor esi, esi
call fcn.100075f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DownloadUrl_CreateFileA_error:__d
call fcn.10006a90
add esp, 8
jmp 0x10007560
push 0x2800
call fcn.1000fdd8
mov edi, eax
add esp, 4
test edi, edi
jne 0x10007478
xor esi, esi
call fcn.100075f0
push str.DownloadUrl_new_char__
call fcn.10006a90
add esp, 4
jmp 0x10007547
xor ebx, ebx
lea ebx, [ebx]
push 0x2800
push 0
push edi
mov dword [ebp - 0x1260], 0
call fcn.1000fc30
add esp, 0xc
lea eax, [ebp - 0x1260]
push eax
push 0x2800
push edi
push dword [ebp - 0x12a8]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x10007480
mov eax, dword [ebp - 0x1260]
test eax, eax
je 0x10007504
push 0
lea ecx, [ebp - 0x1268]
push ecx
push eax
push edi
push esi
add ebx, eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
test esi, esi
je 0x100074e3
mov esi, dword [ebp - 0x12b0]
jmp 0x10007480
call fcn.100075f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DownloadUrl_WriteFile_Error:_d
call fcn.10006a90
mov ebx, dword [ebp - 0x12a8]
add esp, 8
jmp 0x10007547
call fcn.100075f0
push ebx
push dword [ebp - 0x1278]
push str.DownloadUrl
call fcn.10006a90
mov ebx, dword [ebp - 0x12a8]
add esp, 0xc
mov esi, 1
jmp 0x10007547
xor esi, esi
call fcn.100075f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InternetCrackUrlA_error_:_d
call fcn.10006a90
add esp, 8
xor ebx, ebx
push dword [ebp - 0x12b0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x10007560
push edi
call fcn.1000e3fd
add esp, 4
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x1000756d
push ebx
call edi
mov eax, dword [ebp - 0x12ac]
test eax, eax
je 0x1000757a
push eax
call edi
mov eax, dword [ebp - 0x12b8]
test eax, eax
je 0x10007587
push eax
call edi
mov eax, dword [ebp - 0x12b4]
test eax, eax
je 0x10007594
push eax
call edi
mov ebx, dword [ebp + 8]
jmp 0x1000759b
xor esi, esi
cmp dword [ebp + 0x1c], 0x10
jb 0x100075aa
push ebx
call fcn.1000dde0
add esp, 4
cmp dword [ebp + 0x34], 0x10
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
jb 0x100075cd
push dword [ebp + 0x20]
call fcn.1000dde0
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000ef85
mov esp, ebp
pop ebp
ret