Function at 0x419878
Capabilities:
Get file size
Move file
Write file on windows

Disassembly:
mov eax, 0x47b400
call fcn.00478530
sub esp, 0x68
push ebx
push esi
push edi
mov esi, ecx
push str..tmp
lea ecx, [ebp - 0x1c]
call fcn.00429b38
lea ecx, [ebp - 0x1c]
lea eax, [esi + 8]
push ecx
mov dword [ebp - 0x30], eax
push eax
lea eax, [ebp - 0x18]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00429cf0
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.00429a78
push ebx
push 0x80
push 2
push ebx
push ebx
push 2
lea ecx, [ebp - 0x18]
call fcn.00428c5a
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x419929
lea ecx, [ebp - 0x18]
call fcn.00428c5a
push eax
lea ecx, [ebp - 0x30]
call fcn.00428575
mov esi, eax
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00428c5a
push eax
lea eax, [ebp - 0x2c]
push str.Cant_create_file__s_error__d
push eax
call fcn.004253a6
add esp, 0x10
lea eax, [ebp - 0x2c]
push 0x483c5c
push eax
call sub.MSVCRT.dll__CxxThrowException
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esi + 0x2c], eax
mov dword [esi + 0x28], eax
jne 0x419952
push 0x41
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x2c]
call fcn.0042328b
mov ecx, eax
call fcn.00423397
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esi + 0x28]
je 0x419978
push 0x43
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x2c]
call fcn.0042328b
mov ecx, eax
call fcn.00423397
lea ecx, [ebp - 0x5c]
call fcn.004258a3
push dword [esi + 0x28]
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 4
push str.Content_Type:_application_x_www_form_urlencoded_r_nRange:_bytes_d__r_nAccept_Encoding:gzip__deflate
push eax
call fcn.004296c6
lea edi, [esi + 0xc]
add esp, 0xc
mov ecx, edi
mov dword [ebp - 0x28], edi
call fcn.00428c5a
push eax
lea ecx, [ebp - 0x5c]
call fcn.00425da3
cmp dword [ebp - 0x54], ebx
jne 0x4199da
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x34]
push str.Cant_connect_to_server
push eax
call fcn.004253a6
pop ecx
lea eax, [ebp - 0x34]
pop ecx
push 0x483c5c
push eax
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x5c]
call fcn.00425d30
cmp eax, 0xc8
mov dword [ebp - 0x24], eax
jb 0x419b72
cmp eax, 0x12c
jae 0x419b72
lea ecx, [ebp - 0x5c]
call fcn.00425cbd
mov ecx, dword [esi + 0x28]
add ecx, eax
mov dword [esi + 0x30], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, esi
mov dword [esi + 0x34], eax
call 0x419b9f
lea ecx, [ebp - 0x74]
call fcn.00426a17
push 0x4000
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 5
call fcn.00426b27
lea ecx, [ebp - 0x74]
call fcn.00422c4a
mov dword [ebp - 0x20], eax
jmp 0x419ac6
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x5c]
push eax
push 0x4000
push dword [ebp - 0x20]
call fcn.00425e49
cmp al, bl
je 0x419b45
cmp dword [ebp - 0x14], ebx
je 0x419acf
lea eax, [ebp - 0x24]
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x20]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x419a93
push 0x6e
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x3c]
call fcn.0042328b
mov ecx, eax
call fcn.00423397
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
je 0x419ab1
push 0x6f
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x44]
call fcn.0042328b
mov ecx, eax
call fcn.00423397
mov eax, dword [ebp - 0x14]
mov ecx, esi
add dword [esi + 0x2c], eax
call 0x419b9f
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
jae 0x419acf
cmp byte [esi + 0x24], bl
je 0x419a44
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
jne 0x419b12
mov ecx, dword [ebp - 0x30]
call fcn.00428c5a
push eax
lea ecx, [ebp - 0x18]
call fcn.00428c5a
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x419b12
push 0x7d
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x44]
call fcn.0042328b
mov ecx, eax
call fcn.00423397
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 4
call fcn.00426ad9
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 2
call fcn.004258f0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00429a78
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x28]
push dword [eax]
lea eax, [ebp - 0x34]
push str.Error_of_getting_file__s
push eax
call fcn.004253a6
add esp, 0xc
lea eax, [ebp - 0x34]
push 0x483c5c
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
lea eax, [ebp - 0x34]
push dword [ebp - 0x24]
push str.Incorrect_status_code__d_from__s
push eax
call fcn.004253a6
add esp, 0x10
lea eax, [ebp - 0x34]
push 0x483c5c
push eax
call sub.MSVCRT.dll__CxxThrowException
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x30]
sub eax, dword [esi + 0x34]
xor edx, edx
cmp ecx, edx
jne 0x419bbd
fldz
jmp 0x419bd6
push edi
mov edi, dword [esi + 0x2c]
mov dword [ebp - 8], edi
mov dword [ebp - 4], edx
fild qword [ebp - 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
fild qword [ebp - 8]
pop edi
fdivp st(1)
fstp qword [esi + 0x10]
cmp eax, edx
jne 0x419be1
fldz
jmp 0x419c01
mov ecx, dword [esi + 0x2c]
mov dword [ebp - 4], edx
sub ecx, dword [esi + 0x28]
mov dword [ebp - 8], ecx
fild qword [ebp - 8]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
fild qword [ebp - 8]
fdivp st(1)
fmul qword [0x47fd70]
fstp qword [esi + 0x18]
pop esi
leave
ret