Function at 0x48fb60
Capabilities:
Check for time delay via gettickcount
Copy file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 4]
cmp dword [esi + 0x18], 0
lea ebx, [esi + 0x6b0]
jne 0x49014c
cmp dword [0x4f7020], 0
jne 0x49014c
mov eax, dword [esi + 0x10]
cmp eax, 0x11
je 0x49014c
cmp eax, 0xf
je 0x49014c
cmp dword [ebx + 0x30c], 0
jne 0x48fd7e
lea eax, [ebx + 0x104]
push 4
push eax
mov dword [ebp - 4], eax
call fcn.004b95ac
add esp, 8
test eax, eax
jne 0x48fc35
mov eax, dword [ebp - 4]
push 0x4c7b64
push eax
call fcn.0049d1a1
add esp, 8
test eax, eax
jne 0x48fc2a
mov ecx, dword [ebp - 4]
push ecx
push 0x167
push str.WriteDataToFile
push str._s__d____s__cant_open_with_write__
call fcn.00487d90
add esp, 0x10
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x10], 0x11
test eax, eax
je 0x48fc1e
cmp dword [esi + 0x18], 0
jne 0x48fc1e
mov edx, dword [esi + 0xa10]
mov ecx, dword [esi + 0x20]
push 0
push edx
push ecx
push 0x11
call eax
add esp, 0x10
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x30c], eax
jmp 0x48fd7e
mov edi, dword [ebp - 4]
push 0
push edi
call fcn.004b95ac
add esp, 8
test eax, eax
jne 0x48fc93
push edi
push 0x177
push str.WriteDataToFile
push str._s__d___s_cant_write__
call fcn.00487d90
mov eax, dword [esi + 0x1c]
add esp, 0x10
mov dword [esi + 0x10], 0x11
test eax, eax
je 0x48fc87
cmp dword [esi + 0x18], 0
jne 0x48fc87
mov edx, dword [esi + 0xa10]
mov ecx, dword [esi + 0x20]
push 0
push edx
push ecx
push 0x11
call eax
add esp, 0x10
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 0x358]
push edx
call fcn.0048f470
add esp, 4
test eax, eax
jne 0x48fcf1
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x10], 0xf
test eax, eax
je 0x48fcce
cmp dword [esi + 0x18], 0
jne 0x48fcce
mov ecx, dword [esi + 0xa10]
mov edx, dword [esi + 0x20]
push 0
push ecx
push edx
push 0xf
call eax
add esp, 0x10
push 0x188
push str.WriteDataToFile
push str._s__d__Create_download_file_failure__n
call fcn.00487d90
add esp, 0xc
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
mov esp, ebp
pop ebp
ret
push 0x74
lea edi, [ebx + 0x208]
mov dword [ebx + 0x30c], eax
call fcn.0048f470
add esp, 4
test eax, eax
jne 0x48fd72
mov ebx, dword [ebx + 0x30c]
test ebx, ebx
je 0x48fd27
push ebx
call fcn.0049d986
mov eax, dword [ebp - 4]
push eax
call fcn.0049c9fe
add esp, 8
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x10], 0xf
test eax, eax
je 0x48fd4f
cmp dword [esi + 0x18], 0
jne 0x48fd4f
mov ecx, dword [esi + 0xa10]
mov edx, dword [esi + 0x20]
push 0
push ecx
push edx
push 0xf
call eax
add esp, 0x10
push 0x19b
push str.WriteDataToFile
push str._s__d__Create_log_failure__n
call fcn.00487d90
add esp, 0xc
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call fcn.0049d986
mov edi, dword [ebp + 8]
add esp, 4
cmp dword [esi + 0x18], 0
jne 0x49014c
cmp dword [0x4f7020], 0
jne 0x49014c
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx + 0x30c]
push 0
push eax
push ecx
call fcn.0049d89d
mov edx, dword [ebx + 0x360]
mov eax, dword [edi + 0x14]
lea ecx, [eax + edx]
mov edx, dword [ebx + 0x358]
add esp, 0xc
cmp ecx, edx
jbe 0x48fdda
push eax
push ecx
push edx
push 0x1b1
push str.WriteDataToFile
push str._s__d___filesize__ld__dltotalbytes__ld__length__ld__n
call fcn.00487d90
add esp, 0x18
lea eax, [edi + 0x18]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x14]
mov dword [ebp + 8], eax
test eax, eax
jle 0x48fe26
lea ebx, [ebx]
mov ecx, dword [ebx + 0x30c]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
push ecx
push edx
push 1
push eax
call fcn.0049d5a0
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
je 0x48ff80
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
add dword [ebp - 4], ecx
sub eax, ecx
mov dword [ebp + 8], eax
test eax, eax
jg 0x48fdf0
cmp dword [esi + 0x18], 0
jne 0x49014c
cmp dword [0x4f7020], 0
jne 0x49014c
mov edx, dword [edi + 0x14]
add dword [ebx + 0x360], edx
mov eax, dword [edi + 0x14]
add dword [edi + 0xc], eax
mov edx, dword [ebx + 0x360]
mov ecx, dword [edi + 0xc]
cmp edx, dword [ebx + 0x358]
jne 0x48fffe
mov eax, dword [ebx + 0x30c]
push eax
call fcn.0049d986
add esp, 4
test eax, eax
je 0x48fe93
call fcn.0049f9cc
mov ecx, dword [eax]
push ecx
push 0x1e0
push str.WriteDataToFile
push str._s__d___fclose_error_errno__d__n
call fcn.00487d90
add esp, 0x10
lea edi, [ebx + 0x208]
push edi
mov dword [ebx + 0x30c], 0
call fcn.0049c9fe
add esp, 4
test eax, eax
je 0x48fed5
call fcn.0049f9cc
mov edx, dword [eax]
push edx
push 0x1e9
push str.WriteDataToFile
push str._s__d___remove_error_errno__d__n
call fcn.00487d90
push edi
call fcn.0049c9fe
add esp, 0x14
lea edi, [ebx + 0x104]
push ebx
push edi
call fcn.004a0765
add esp, 8
test eax, eax
je 0x48ff2d
call fcn.0049f9cc
mov eax, dword [eax]
push eax
push 0x1f0
push str.WriteDataToFile
push str._s__d___rename_error_errno__d__n
call fcn.00487d90
add esp, 0x10
push 1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x48ff2d
push 0x1f4
push str.WriteDataToFile
push str._s__d___CopyFile_failure_n
call fcn.00487d90
add esp, 0xc
cmp byte [esi + 0x9e8], 0
je 0x48ffc5
cmp dword [esi + 0x18], 0
mov dword [esi + 0x10], 4
jne 0x48fff2
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x48ff6b
mov ecx, dword [esi + 0xa08]
mov edx, dword [esi + 0xa10]
push ecx
mov ecx, dword [esi + 0x20]
push edx
push ecx
push 4
call eax
add esp, 0x10
push esi
call fcn.00490f10
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0049f9cc
mov ecx, dword [ebx + 0x30c]
mov edx, dword [eax]
mov eax, dword [ebp - 8]
push ecx
push edx
push eax
push 0x1be
push str.WriteDataToFile
push str._s__d___WriteDataToFile_error_wlen_d_errno___d_ptrdlfileinfo__cdlfp__0x_x_n
call fcn.00487d90
mov ecx, dword [ebx + 0x30c]
push ecx
call fcn.0049d986
add esp, 0x1c
mov dword [ebx + 0x30c], 0
jmp 0x48fbf6
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x10], 6
test eax, eax
je 0x48fff2
cmp dword [esi + 0x18], 0
jne 0x48fff2
mov edx, dword [esi + 0xa08]
mov ecx, dword [esi + 0xa10]
push edx
mov edx, dword [esi + 0x20]
push ecx
push edx
push 6
call eax
add esp, 0x10
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x10]
cmp ecx, eax
jbe 0x49001e
push eax
push ecx
push 0x213
push str.WriteDataToFile
push str._s__d__offset__d__end__d__n
call fcn.00487d90
add esp, 0x14
cmp dword [esi + 0x18], 0
jne 0x49014c
cmp dword [0x4f7020], 0
jne 0x49014c
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 0x10]
jne 0x49007b
mov ecx, dword [edi + 8]
mov eax, dword [edi + 4]
lea ecx, [ebx + ecx*8 + 0x364]
call fcn.0048fb10
mov ecx, dword [edi + 8]
mov edx, dword [ebx + ecx*8 + 0x364]
mov edi, dword [edi + 4]
mov eax, ecx
imul eax, eax, 0x114
mov dword [eax + edi + 0x158], edx
mov ecx, dword [ebx + ecx*8 + 0x368]
mov dword [eax + edi + 0x15c], ecx
jmp 0x490092
mov eax, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [ebx + eax*8 + 0x364], edx
mov ecx, dword [edi + 0x10]
mov dword [ebx + eax*8 + 0x368], ecx
call sub.KERNEL32.dll_GetTickCount
xor edx, edx
div dword [esi + 0x24]
cmp dword [esi + 0x28], eax
je 0x49011f
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x10]
cmp eax, 0x14
jne 0x4900d3
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x49011f
cmp dword [esi + 0x18], 0
jne 0x49014c
mov edx, dword [esi + 0xa08]
mov ecx, dword [esi + 0xa10]
push edx
mov edx, dword [esi + 0x20]
push ecx
push edx
push 3
jmp 0x49011a
cmp eax, 3
je 0x4900f7
mov ecx, dword [esi + 0xa10]
push ecx
push eax
push 0x23d
push str.WriteDataToFile
push str._s__d__ptrdownloadinfo__status_d_dltotalbytes_d_n
call fcn.00487d90
add esp, 0x14
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x49011f
cmp dword [esi + 0x18], 0
jne 0x49014c
mov edx, dword [esi + 0xa08]
mov ecx, dword [esi + 0xa10]
push edx
mov edx, dword [esi + 0x20]
push ecx
mov ecx, dword [esi + 0x10]
push edx
push ecx
call eax
add esp, 0x10
cmp dword [esi + 0x18], 0
jne 0x49014c
mov eax, dword [ebx + 0x360]
shr eax, 0x14
cmp dword [ebx + 0x314], eax
jae 0x490169
mov dword [ebx + 0x314], eax
mov eax, ebx
call fcn.0048f9a0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x30c]
test eax, eax
je 0x490169
push eax
call fcn.0049d986
add esp, 4
mov dword [ebx + 0x30c], 0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret