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

Disassembly:
mov eax, 0x48b464
call fcn.004874e0
mov eax, 0x4048
call fcn.004875f0
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esi + 4]
mov dword [ebp - 0x34], ecx
call fcn.00435b65
mov ebx, eax
lea ecx, [ebp - 0x1c]
neg ebx
sbb bl, bl
or dword [ebp - 0x14], 0xffffffff
inc bl
call fcn.004350ff
xor edi, edi
test bl, bl
mov dword [ebp - 4], edi
je 0x4204cd
push str..tmp
lea ecx, [ebp - 0x18]
call fcn.004354bc
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x10]
push dword [ebp - 0x34]
push eax
call fcn.00435674
add esp, 0xc
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.0043553d
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004353fc
and byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.004353fc
push edi
push 0x80
push 2
push edi
push edi
push 2
lea ecx, [ebp - 0x1c]
call fcn.00435b75
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x42047d
lea ecx, [ebp - 0x1c]
call fcn.00435b75
push eax
lea ecx, [ebp - 0x20]
call fcn.00433e42
mov esi, eax
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00435b75
push eax
lea eax, [ebp - 0x30]
push str.Cant_create_file__s_error__d
push eax
call fcn.00430892
add esp, 0x10
lea eax, [ebp - 0x30]
push 0x49c754
push eax
call sub.MSVCRT.dll__CxxThrowException
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esi + 0x24], eax
jne 0x4204a3
push 0x71
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x24]
call fcn.0042e609
mov ecx, eax
call fcn.0042e715
push 2
push edi
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esi + 0x24]
je 0x4204d0
push 0x73
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x24]
call fcn.0042e609
mov ecx, eax
call fcn.0042e715
jmp 0x4204d0
mov dword [esi + 0x24], edi
mov eax, dword [esi + 0x24]
lea ecx, [ebp - 0x4c]
mov dword [esi + 0x28], eax
call fcn.00430ea6
push dword [esi + 0x24]
lea eax, [ebp - 0x3c]
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.00434ff6
lea ecx, [esi + 8]
add esp, 0xc
mov dword [ebp - 0x18], ecx
call fcn.00435b75
push eax
lea ecx, [ebp - 0x4c]
call fcn.004313a6
cmp dword [ebp - 0x44], edi
jne 0x420540
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
call fcn.00435b75
push eax
lea eax, [ebp - 0x30]
push str.Cant_connect_to_server_url_s
push eax
call fcn.00430892
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x49c754
push eax
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x4c]
call fcn.00431333
cmp eax, 0xc8
mov dword [ebp - 0x20], eax
jb 0x4206f2
cmp eax, 0x12c
jae 0x4206f2
lea ecx, [ebp - 0x4c]
call fcn.004312c0
mov ecx, dword [esi + 0x24]
mov dword [ebp - 0x10], eax
add ecx, eax
mov dword [esi + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test bl, bl
mov dword [esi + 0x30], eax
jne 0x42058c
push dword [ebp - 0x10]
lea ecx, [esi + 0xc]
mov eax, dword [ecx]
call dword [eax + 4]
push edi
mov ecx, esi
call fcn.0042028e
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x4054]
push 0x4000
push eax
call fcn.0043144c
test al, al
je 0x4206c1
xor edi, edi
cmp dword [ebp - 0x10], edi
je 0x420647
test bl, bl
je 0x42061b
lea eax, [ebp - 0x20]
push edi
push eax
lea eax, [ebp - 0x4054]
push dword [ebp - 0x10]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4205f8
push 0xa6
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x54]
call fcn.0042e609
mov ecx, eax
call fcn.0042e715
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
je 0x42062d
push 0xa7
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x2c]
call fcn.0042e609
mov ecx, eax
call fcn.0042e715
jmp 0x42062d
push dword [ebp - 0x10]
lea eax, [ebp - 0x4054]
lea ecx, [esi + 0xc]
push eax
call fcn.00432271
mov eax, dword [ebp - 0x10]
push edi
add dword [esi + 0x28], eax
mov ecx, esi
call fcn.0042028e
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x2c]
jb 0x420594
push 1
mov ecx, esi
call fcn.0042028e
test bl, bl
je 0x42069a
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x2c]
jne 0x42069a
mov ecx, dword [ebp - 0x34]
call fcn.00435b75
push eax
lea ecx, [ebp - 0x1c]
call fcn.00435b75
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x42069a
push 0xbb
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x2c]
call fcn.0042e609
mov ecx, eax
call fcn.0042e715
and byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00430ef3
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004353fc
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
test bl, bl
je 0x4206ce
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
push dword [eax]
lea eax, [ebp - 0x30]
push str.Error_of_getting_file__s
push eax
call fcn.00430892
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x49c754
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
push dword [eax]
lea eax, [ebp - 0x30]
push dword [ebp - 0x20]
push str.Incorrect_status_code__d_from__s
push eax
call fcn.00430892
add esp, 0x10
lea eax, [ebp - 0x30]
push 0x49c754
push eax
call sub.MSVCRT.dll__CxxThrowException