Function at 0x401e50
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5303eb
mov eax, dword fs:[0]
push eax
sub esp, 0x4b4
mov eax, dword [0x57dcf0]
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
push 0
push 0
push 0
push 1
push str.FileDownloader
mov esi, ecx
mov edi, edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x414], eax
test eax, eax
jne 0x401f12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.Error_opening_Internet_session:
call fcn.00407050
add esp, 8
push eax
call fcn.00403090
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403270
mov eax, dword [esi]
mov eax, dword [eax + 4]
add eax, esi
xor edi, edi
test byte [eax + 0xc], 6
jne 0x401eea
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401eea
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401f0b
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401f03
or eax, 4
push 0
push eax
call fcn.00401ba0
xor al, al
jmp 0x40212a
cmp dword [esi + 0x14], 0x10
jb 0x401f1a
mov esi, dword [esi]
push 0
push 0x84000100
push 0
push 0
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
test ebx, ebx
jne 0x401fb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.Error_opening_URL:
call fcn.00407050
add esp, 8
push eax
call fcn.00403090
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403270
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 0xc], 6
jne 0x401f82
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401f82
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x401fa3
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401f9b
or eax, 4
push 0
push eax
call fcn.00401ba0
mov edx, dword [ebp - 0x414]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x40212a
push edi
lea eax, [ebp - 0x4c0]
push eax
call fcn.004038e0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x4c0]
mov edx, dword [ecx + 4]
mov eax, dword [ebp + edx - 0x4b4]
test al, 6
je 0x40206f
push str.Error_opening_output_file
call fcn.00407050
add esp, 4
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403270
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ecx, dword [eax + esi + 0xc]
add eax, esi
xor edi, edi
test cl, 6
jne 0x402023
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x402023
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x402044
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x40203c
or eax, 4
push 0
push eax
call fcn.00401ba0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov edx, dword [ebp - 0x414]
push edx
call esi
lea ecx, [ebp - 0x4c0]
mov dword [ebp - 4], 0xffffffff
call fcn.00402150
xor al, al
jmp 0x40212a
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp - 0x418]
push eax
push 0x400
lea ecx, [ebp - 0x410]
push ecx
push ebx
call esi
test eax, eax
je 0x4020ca
nop
mov eax, dword [ebp - 0x418]
test eax, eax
je 0x4020ca
push 0
push eax
lea edx, [ebp - 0x410]
push edx
lea eax, [ebp - 0x4c0]
push eax
call fcn.004033e0
lea ecx, [ebp - 0x418]
push ecx
push 0x400
lea edx, [ebp - 0x410]
push edx
push ebx
call esi
test eax, eax
jne 0x402090
lea ecx, [ebp - 0x4bc]
call fcn.00404a10
test eax, eax
jne 0x402104
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0x4b4]
lea ecx, [ebp + ecx - 0x4c0]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x4020fc
or eax, 4
push 0
push eax
call fcn.00401ba0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov ecx, dword [ebp - 0x414]
push ecx
call esi
lea ecx, [ebp - 0x4c0]
mov dword [ebp - 4], 0xffffffff
call fcn.00402150
mov al, 1
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.00507b10
mov esp, ebp
pop ebp
ret