Function at 0x4bf7e0
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56cff8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5d6b80]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0045adc0
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x4bf826
push 0x80004005
call fcn.0045a8f0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
push eax
push dword [esi + 0x74]
call fcn.004bdaa0
mov ebx, dword [ebp - 0x10]
add esp, 8
or edi, 0xffffffff
test eax, eax
jns 0x4bf86d
push eax
push str.CPostInstOfferManager::SaveDownloadFile___GetLocalAppDataPathCreate_failed:_0x_x
push 2
call fcn.004e4340
add esp, 0xc
mov dword [ebp + 0xc], 0
jmp 0x4bf9be
lea eax, [ebx - 0x10]
push eax
call fcn.0045a950
add eax, 0x10
add esp, 4
mov dword [ebp - 0x14], eax
push 0xb
push str.octemp.exe
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00472540
mov esi, dword [ebp - 0x14]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
jne 0x4bf8d9
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CPostInstOfferManager::SaveDownloadFile___CreateFile_failed:_0x_x____s
push 2
call fcn.004e4340
add esp, 0x10
mov dword [ebp + 0xc], 0
jmp 0x4bf9a1
push 0
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4bf921
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CPostInstOfferManager::SaveDownloadFile___WriteFile_failed:_0x_x____s
push 2
call fcn.004e4340
add esp, 0x10
mov dword [ebp + 0xc], 0
or edi, 0xffffffff
jmp 0x4bf9a1
lea eax, [ebx - 0x10]
push eax
call fcn.0045a950
add eax, 0x10
add esp, 4
mov dword [ebp + 0xc], eax
push str.oc.exe
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 2
call fcn.0047f960
mov edi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x4bf97a
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CPostInstOfferManager::SaveDownloadFile___MoveFile_failed:_0x_x____s
push 2
call fcn.004e4340
add esp, 0x10
mov dword [ebp + 0xc], 0
jmp 0x4bf981
mov dword [ebp + 0xc], 1
lea edx, [edi - 0x10]
mov byte [ebp - 4], 1
or edi, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4bf9a1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4bf9be
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x4bf9dc
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8