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

Disassembly:
mov eax, 0x45e804
call fcn.0045d320
sub esp, 0x60
push ebx
push esi
mov esi, ecx
push edi
push str..tmp
lea eax, [esi + 8]
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00412faf
add esp, 0xc
xor ebx, ebx
lea ecx, [ebp - 0x18]
push ebx
push 0x80
push 2
push ebx
push ebx
push 2
mov dword [ebp - 4], ebx
call fcn.00414407
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x407e3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push dword [ebp - 0x18]
push str.Cant_create_file__s_error__d
push eax
call fcn.004109c8
add esp, 0x10
lea eax, [ebp - 0x30]
push 0x465b58
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 0x407e63
push 0x3f
push str.C:projectsAmmyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x28]
call fcn.00410522
mov ecx, eax
call fcn.0041062e
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esi + 0x28]
je 0x407e89
push 0x41
push str.C:projectsAmmyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x28]
call fcn.00410522
mov ecx, eax
call fcn.0041062e
lea ecx, [ebp - 0x6c]
call fcn.00410ad0
push dword [esi + 0x28]
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 1
push str.Content_Type:_application_x_www_form_urlencoded_r_nRange:_bytes_d__r_nAccept_Encoding:gzip__deflate
push eax
call fcn.00413c31
lea edi, [esi + 0xc]
add esp, 0xc
mov ecx, edi
mov dword [ebp - 0x24], edi
call fcn.00414407
push eax
lea ecx, [ebp - 0x6c]
call fcn.00410fd3
cmp dword [ebp - 0x64], ebx
jne 0x407eeb
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x30]
push str.Cant_connect_to_server
push eax
call fcn.004109c8
pop ecx
lea eax, [ebp - 0x30]
pop ecx
push 0x465b58
push eax
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x6c]
call fcn.00410f60
cmp eax, 0xc8
mov dword [ebp - 0x20], eax
jb 0x40807d
cmp eax, 0x12c
jae 0x40807d
lea ecx, [ebp - 0x6c]
call fcn.00410eed
add eax, dword [esi + 0x28]
mov dword [esi + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, esi
mov dword [esi + 0x34], eax
call 0x4080aa
lea ecx, [ebp - 0x54]
call fcn.00411c60
mov edi, 0x4000
lea ecx, [ebp - 0x54]
push edi
mov byte [ebp - 4], 2
call fcn.00412102
lea ecx, [ebp - 0x54]
call fcn.00412465
mov dword [ebp - 0x1c], eax
cmp byte [esi + 0x24], bl
jne 0x408008
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x6c]
push eax
push edi
push dword [ebp - 0x1c]
call fcn.00411073
cmp al, bl
je 0x407fdb
cmp dword [ebp - 0x14], ebx
je 0x408008
lea eax, [ebp - 0x20]
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x407fa3
push 0x6c
push str.C:projectsAmmyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x38]
call fcn.00410522
mov ecx, eax
call fcn.0041062e
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x14]
je 0x407fc1
push 0x6d
push str.C:projectsAmmyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x40]
call fcn.00410522
mov ecx, eax
call fcn.0041062e
mov eax, dword [ebp - 0x14]
mov ecx, esi
add dword [esi + 0x2c], eax
call 0x4080aa
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
jae 0x408008
jmp 0x407f4f
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x24]
push dword [eax]
lea eax, [ebp - 0x30]
push str.Error_of_getting_file__s
push eax
call fcn.004109c8
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x465b58
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
jne 0x40804b
mov ecx, dword [ebp - 0x2c]
call fcn.00414407
push eax
lea ecx, [ebp - 0x18]
call fcn.00414407
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x40804b
push 0x7b
push str.C:projectsAmmyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x40]
call fcn.00410522
mov ecx, eax
call fcn.0041062e
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
call fcn.00411cb9
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], bl
call fcn.00410b1d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00412d67
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]
push dword [edi]
lea eax, [ebp - 0x30]
push dword [ebp - 0x20]
push str.Incorrect_status_code__d_from__s
push eax
call fcn.004109c8
add esp, 0x10
lea eax, [ebp - 0x30]
push 0x465b58
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 0x4080c8
fldz
jmp 0x4080e1
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 0x4080ec
fldz
jmp 0x40810c
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 [0x461838]
fstp qword [esi + 0x18]
pop esi
leave
ret