Function at 0x487ce0
Capabilities:
Clear file content
Get file attributes
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4f6c68
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
mov esi, dword [esp + 0x28]
test esi, esi
push edi
jne 0x487d15
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
lea edi, [esi + 4]
push 0
push edi
mov dword [esp + 0x20], edi
call fcn.00438f20
add esp, 8
test eax, eax
je 0x487d49
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x487d49
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov eax, dword [0x50bea4]
push ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x210]
mov dword [esp + 0x28], 0
mov ecx, dword [eax]
cmp ecx, eax
mov dword [esp + 0x10], ecx
je 0x487ec7
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x5346d8
test ecx, ecx
jne 0x487d8a
xor eax, eax
jmp 0x487d91
push 0x5346d8
call edi
push 0x5346d8
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
mov edx, dword [esp + 0x10]
mov esi, dword [edx + 0xc]
test esi, esi
jne 0x487daf
xor eax, eax
jmp 0x487db2
push esi
call edi
push esi
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
mov eax, 0x5346d0
test eax, eax
je 0x487dcd
push 0x5346d0
call edi
push 0x5346d0
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
mov ecx, dword [esp + 0x10]
mov ebx, dword [ecx + 0x10]
mov edx, dword [ebx + 4]
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov ecx, dword [ebx + 4]
cmp eax, ecx
je 0x487e87
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x487e02
xor eax, eax
jmp 0x487e05
push esi
call edi
push esi
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
mov eax, 0x529c20
test eax, eax
je 0x487e20
push 0x529c20
call edi
push 0x529c20
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
mov ecx, dword [esp + 0x14]
mov esi, dword [ecx + 0x10]
test esi, esi
jne 0x487e3e
xor eax, eax
jmp 0x487e41
push esi
call edi
push esi
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
mov edx, 0x50cf98
test edx, edx
jne 0x487e59
xor eax, eax
jmp 0x487e60
push 0x50cf98
call edi
push 0x50cf98
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
lea ecx, [esp + 0x14]
call fcn.00489fb0
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 4]
cmp eax, ecx
jne 0x487df7
mov eax, 0x50cf98
test eax, eax
je 0x487e97
push 0x50cf98
call edi
push 0x50cf98
push eax
lea ecx, [esp + 0x14]
call fcn.004165f0
lea ecx, [esp + 0x10]
call fcn.00489ac0
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [edx + 0x210]
jne 0x487d7d
mov edi, dword [esp + 0x1c]
push 0
push 0x20
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x487f71
mov eax, dword [esp + 0xc]
mov edi, dword [eax - 8]
shl edi, 1
jne 0x487efc
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x487f6a
add edi, 2
lea ecx, [edi + 2]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
lea edx, [esi + edi]
mov word [edx], 0
je 0x487f6a
mov word [esi], 0xfeff
mov eax, dword [esp + 0xc]
lea ecx, [esi + 2]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
lea edx, [esp + 0x30]
mov dword [esp + 0x30], 0
push 0
push edx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x487f61
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esp + 0x30], edi
jne 0x487f61
mov dword [esp + 0x18], 1
push esi
call fcn.004f3eca
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xc]
mov edx, dword [0x50b100]
pop ebx
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x487fa1
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x487fa1
mov edx, dword [esp + 8]
add edx, 0xfffffff4
push edx
call fcn.004f3eca
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x20
ret