Function at 0x4990d0
Capabilities:
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 0xffffffffffffffff
push 0x4de3c8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x526f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [esi]
mov edx, dword [eax + 4]
lea edi, [esi + 4]
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], 0xffffffff
mov dword [edi], ebx
call edx
mov edx, dword [edi]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push edx
push eax
mov eax, dword [ebp + 8]
push eax
push str.CHttpRemoteFile::DownloadToFile__s_:_GetSize_returned__d:__d
push ecx
call fcn.0046da40
add esp, 0x14
call fcn.00498d70
mov eax, dword [ebp + 8]
add esp, 4
lea ecx, [ebp - 0x10]
push ecx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov edi, esp
push eax
call fcn.00425445
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.0046e490
add esp, 8
test eax, eax
jne 0x4991aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp - 0x1c], esp
push eax
mov eax, dword [ebp + 8]
push eax
push str._CHttpRemoteFile::DownloadToFile__s_:_failed_creating_file__LE_d
push edx
call fcn.0046da40
add esp, 0x10
call fcn.00498d70
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x49931b
push 0x4000
call fcn.004bc352
mov edx, dword [esi + 0x10]
add esp, 4
lea ecx, [ebp - 0x14]
push ecx
push 0x4000
mov edi, eax
push edi
push edx
mov dword [esi + 8], ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x499218
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x49923c
mov edx, dword [ebp - 0x10]
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
cmp ecx, eax
jne 0x4992ac
add ebx, eax
lea eax, [ebp - 0x14]
push eax
push 0x4000
mov dword [esi + 8], ebx
mov ecx, dword [esi + 0x10]
push edi
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4991d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp - 0x1c], esp
push eax
mov eax, dword [ebp + 8]
push eax
push str._CHttpRemoteFile::DownloadToFile__s_:_InternetReadFile_failed__LE_d
push edx
call fcn.0046da40
add esp, 0x10
jmp 0x4992c7
push edi
call fcn.004bc235
mov ecx, dword [ebp - 0x10]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push ecx
mov edx, esp
mov dword [ebp - 0x1c], esp
push ebx
push eax
push str.CHttpRemoteFile::DownloadToFile__s_:_done__dwContentLength_d
push edx
call fcn.0046da40
add esp, 0x10
call fcn.00498d70
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x499296
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push ecx
mov edx, esp
mov dword [ebp - 0x1c], esp
push ebx
push eax
mov eax, dword [ebp + 8]
push ecx
push eax
push str._CHttpRemoteFile::DownloadToFile__s_:_dwNumWrite__d____dwNumRead__d___offset_d
push edx
call fcn.0046da40
add esp, 0x18
call fcn.00498d70
push edi
call fcn.004bc235
mov ecx, dword [ebp - 0x10]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov esi, esp
push eax
call fcn.00425445
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00470b40
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
add esp, 4
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x499327
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4