Function at 0x4a9a50
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x30]
push ebp
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push SHChangeNotifyDeregister
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4a9adf
mov ecx, dword [esp + 0x3c]
push 0
push str.Error1_
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [esp + 0x3c]
mov ecx, dword [0x546564]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4a9abf
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4a9abf
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x40]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4a9d4f
add eax, 0xfffffff4
push eax
call esi
jmp 0x4a9d3b
push ebx
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [0x546560]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], 0
mov edx, dword [eax - 0xc]
lea esi, [eax - 0xc]
cmp edx, 1
lea ecx, [ebx + 1]
mov dword [esp + 0x18], esi
jg 0x4a9b13
cmp ecx, dword [eax - 4]
jle 0x4a9b64
mov edi, dword [eax - 8]
cmp ecx, edi
mov dword [esp + 0x14], edi
jge 0x4a9b20
mov ecx, edi
push ecx
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
jne 0x4a9b32
xor esi, esi
jmp 0x4a9b66
lea ecx, [edi + edi + 2]
mov edi, dword [esp + 0x10]
mov eax, ecx
add esi, 0xc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x14]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
push eax
mov dword [ecx - 8], edx
call fcn.00405590
mov eax, dword [esp + 0x10]
mov esi, eax
lea ecx, [esp + 0x1c]
push 0
push ecx
push ebx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebp
lea ecx, [esp + 0x20]
call fcn.00424cf0
push ebx
push esi
lea ecx, [esp + 0x28]
call fcn.00424ee0
mov edx, dword [0x546560]
mov eax, str.ToClipboart
test eax, eax
mov dword [esp + 0x14], edx
je 0x4a9be0
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x4a9be0
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x4a9be0
mov ecx, dword [esp + 0x14]
inc esi
push esi
push str.ToClipboart
push ecx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
push edx
push eax
call fcn.00531809
mov edx, dword [0x546564]
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
mov eax, dword [esp + 0x14]
sete bl
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4a9c28
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4a9c28
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
test bl, bl
pop ebx
je 0x4a9c89
mov ecx, dword [esp + 0x24]
mov eax, dword [0x546560]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.00433000
mov edx, dword [esp + 0x10]
push edx
call fcn.004b6a10
mov eax, dword [esp + 0x14]
mov edx, dword [0x546564]
add esp, 4
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4a9d7b
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4a9d7b
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
jmp 0x4a9d7b
mov eax, dword [esp + 0x40]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4a9d58
mov ecx, dword [esp + 0x40]
push 0
push str.Error_
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [esp + 0x1c]
call fcn.00424d40
mov eax, dword [esp + 0xc]
mov ecx, dword [0x546564]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4a9cf9
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4a9cf9
mov eax, dword [esp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x3c]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4a9d24
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4a9d24
mov edx, dword [esp + 0x3c]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x40]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4a9d4f
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4a9d4f
mov edx, dword [esp + 0x40]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x2c
ret
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x14]
push 0
push eax
push ecx
push edx
push esi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebp
lea ecx, [esp + 0x1c]
call fcn.00424d40
lea ecx, [esp + 0xc]
call fcn.00405700
lea ecx, [esp + 0x3c]
call fcn.00405700
lea ecx, [esp + 0x40]
call fcn.00405700
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x2c
ret