Function at 0x4261e0
Capabilities:
Check http status code
Check if file exists
Create http request
Download and write a file
Get file size
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x1d4
mov eax, dword [0x4c5280]
xor eax, esp
mov dword [esp + 0x1cc], eax
mov eax, dword [esp + 0x1dc]
push ebx
mov ebx, dword [esp + 0x1e8]
push ebp
mov ebp, dword [esp + 0x1e0]
push esi
mov esi, dword [esp + 0x1ec]
push edi
mov edi, dword [esp + 0x1f8]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1fc]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x200]
mov dword [eax], 0
push esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
mov dword [edi], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42630e
lea edx, [esp + 0xd0]
push edx
mov ecx, esi
call fcn.0042e430
add esp, 4
lea eax, [esp + 0xd0]
push ebx
push eax
call fcn.00475af1
add esp, 8
test eax, eax
jne 0x42628f
mov dword [edi], 1
mov eax, 1
jmp 0x426636
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0
push 3
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x10], ebx
cmp ebx, 0xffffffff
je 0x42630e
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x4262dd
test esi, esi
jbe 0x4262df
mov edx, dword [esp + 0x14]
push edx
mov eax, ebp
call fcn.00426110
test eax, eax
jne 0x4262df
xor esi, esi
xor edi, edi
push edi
push edi
push edi
push edi
push ebp
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebp, eax
mov dword [esp + 0x44], ebp
test ebp, ebp
jne 0x426344
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x18]
push ebx
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x426634
push 0
push 0
push 2
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x42633e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
jmp 0x426634
mov ebx, dword [esp + 0x10]
jmp 0x4262dd
mov ebx, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea edx, [esp + 0x2c]
push edx
push 0x37
push ebp
mov dword [esp + 0x38], 0x4e20
call ebx
push 4
lea eax, [esp + 0x2c]
push eax
push 6
push ebp
call ebx
push 4
lea ecx, [esp + 0x2c]
push ecx
push 8
push ebp
call ebx
xor ebx, ebx
cmp esi, ebx
jbe 0x4263c8
push 0x7e
lea eax, [esp + 0x56]
xor edx, edx
push ebx
push eax
mov word [esp + 0x5c], dx
call fcn.00479770
add esp, 0xc
push esi
lea ecx, [esp + 0x54]
push str.Range:bytes_d_
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esp + 0x20]
add esp, 0xc
push ebx
push SysReAllocString
push 0xffffffffffffffff
lea edx, [esp + 0x5c]
push edx
push eax
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov edi, eax
cmp edi, ebx
jne 0x4263c8
xor esi, esi
mov dword [esp + 0x1c], ebx
lea esp, [esp]
cmp esi, ebx
jne 0x4263ea
mov ecx, dword [esp + 0x14]
push ebx
push SysReAllocString
push ebx
push ebx
push ecx
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov edi, eax
cmp edi, ebx
je 0x42644d
push ebx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x38]
push eax
push 0x20000013
push edi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x60], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
mov eax, dword [esp + 0x30]
je 0x42642d
cmp esi, ebx
jne 0x426424
cmp eax, 0xc8
jmp 0x42642b
jbe 0x426485
cmp eax, 0xce
je 0x426485
cmp eax, 0x1a0
jne 0x426470
cmp dword [esp + 0x1c], ebx
jne 0x426470
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor esi, esi
mov dword [esp + 0x1c], 1
jmp 0x4263d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push edx
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x426634
cmp esi, ebx
jbe 0x426617
cmp eax, 0xc8
jne 0x426617
xor esi, esi
push ebx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0x20000005
push edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x5c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4264b2
mov dword [esp + 0x24], ebx
jmp 0x4264dd
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
je 0x4264dd
mov eax, 0x51eb851f
mul ecx
mov ebx, edx
shr ebx, 4
cmp ebx, 0x400
jae 0x4264d5
mov ebx, 0x400
jmp 0x4264e2
cmp ebx, 0x20000
jbe 0x4264e2
mov ebx, 0x20000
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [esp + 0x24]
push 0
push 0
mov ebp, eax
mov eax, dword [esp + 0x18]
push esi
add edx, esi
push eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x4c], edx
mov dword [esp + 0x2c], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], 1
test eax, eax
jbe 0x426583
mov ecx, dword [esp + 0x40]
add dword [ecx], eax
mov ecx, dword [esp + 0x34]
add esi, eax
test ecx, ecx
je 0x42655d
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
push edx
push eax
push esi
call ecx
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x30]
push ecx
push eax
push ebp
push edx
mov dword [esp + 0x40], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x20]
jne 0x4265b6
mov eax, dword [esp + 0x204]
test eax, eax
je 0x426594
mov cl, byte [eax]
test cl, cl
jne 0x4265c2
lea edx, [esp + 0x20]
push edx
push ebx
push ebp
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, eax
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x4265d2
mov eax, dword [esp + 0x20]
test eax, eax
ja 0x426539
jmp 0x4265ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], 0
test ecx, ecx
jne 0x4265e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x18]
mov dword [edx], eax
mov dword [esp + 0x14], 0
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
mov ecx, dword [esp + 0x44]
push ecx
call edi
mov eax, dword [esp + 0x14]
jmp 0x426636
mov edx, dword [esp + 0x18]
mov dword [edx], eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebp
call esi
xor eax, eax
mov ecx, dword [esp + 0x1dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00474db0
add esp, 0x1d4
ret 0x20