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

Disassembly:
mov eax, 0x47f528
call fcn.0047bf90
sub esp, 0x68
push ebx
push esi
push edi
mov esi, ecx
push str..tmp
lea ecx, [ebp - 0x1c]
call fcn.0042c02c
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.0042c1e4
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.0042bf6c
push ebx
push 0x80
push 2
push ebx
push ebx
push 2
lea ecx, [ebp - 0x18]
call fcn.0042b153
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x41bd6c
lea ecx, [ebp - 0x18]
call fcn.0042b153
push eax
lea ecx, [ebp - 0x30]
call fcn.0042aa6e
mov esi, eax
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.0042b153
push eax
lea eax, [ebp - 0x2c]
push str.Cant_create_file__s_error__d
push eax
call fcn.0042783a
add esp, 0x10
lea eax, [ebp - 0x2c]
push 0x48e404
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 0x41bd95
push 0x41
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x2c]
call fcn.00425726
mov ecx, eax
call fcn.00425832
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [esi + 0x28]
je 0x41bdbb
push 0x43
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x2c]
call fcn.00425726
mov ecx, eax
call fcn.00425832
lea ecx, [ebp - 0x5c]
call fcn.00427d37
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.0042bbbf
lea edi, [esi + 0xc]
add esp, 0xc
mov ecx, edi
mov dword [ebp - 0x28], edi
call fcn.0042b153
push eax
lea ecx, [ebp - 0x5c]
call fcn.00428237
cmp dword [ebp - 0x54], ebx
jne 0x41be1d
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.0042783a
pop ecx
lea eax, [ebp - 0x34]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x5c]
call fcn.004281c4
cmp eax, 0xc8
mov dword [ebp - 0x24], eax
jb 0x41bfb5
cmp eax, 0x12c
jae 0x41bfb5
lea ecx, [ebp - 0x5c]
call fcn.00428151
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 0x41bfe2
lea ecx, [ebp - 0x74]
call fcn.00428ebc
push 0x4000
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 5
call fcn.00428fcc
lea ecx, [ebp - 0x74]
call fcn.00429f6b
mov dword [ebp - 0x20], eax
jmp 0x41bf09
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x5c]
push eax
push 0x4000
push dword [ebp - 0x20]
call fcn.004282dd
cmp al, bl
je 0x41bf88
cmp dword [ebp - 0x14], ebx
je 0x41bf12
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 0x41bed6
push 0x6e
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x3c]
call fcn.00425726
mov ecx, eax
call fcn.00425832
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
je 0x41bef4
push 0x6f
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x44]
call fcn.00425726
mov ecx, eax
call fcn.00425832
mov eax, dword [ebp - 0x14]
mov ecx, esi
add dword [esi + 0x2c], eax
call 0x41bfe2
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
jae 0x41bf12
cmp byte [esi + 0x24], bl
je 0x41be87
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
jne 0x41bf55
mov ecx, dword [ebp - 0x30]
call fcn.0042b153
push eax
lea ecx, [ebp - 0x18]
call fcn.0042b153
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x41bf55
push 0x7d
push str.S:Ammyy_sourcesmainDownloader.cpp
lea ecx, [ebp - 0x44]
call fcn.00425726
mov ecx, eax
call fcn.00425832
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 4
call fcn.00428f7e
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 2
call fcn.00427d84
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0042bf6c
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.0042783a
add esp, 0xc
lea eax, [ebp - 0x34]
push 0x48e404
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.0042783a
add esp, 0x10
lea eax, [ebp - 0x34]
push 0x48e404
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 0x41c000
fldz
jmp 0x41c019
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 0x41c024
fldz
jmp 0x41c044
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 [0x483d98]
fstp qword [esi + 0x18]
pop esi
leave
ret