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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0x20], vtable.t_str.0
push 4
mov dword [esp + 0x20], esi
call fcn.0046c3ce
add esp, 4
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x2c], 0
mov dword [eax], 0
call fcn.004a60e0
push dword [ebp + 0xc]
lea ecx, [esp + 0x24]
call fcn.004a5ed0
push 0
push 0
push 0
push 0
push 0
push str.error.log
lea ecx, [esp + 0x58]
call fcn.004b7750
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x24]
call fcn.004b6e40
mov eax, dword [esp + 0x48]
test eax, eax
je 0x4a69e2
push eax
call fcn.00459651
add esp, 4
cmp dword [esp + 0x24], 0
je 0x4a6cf1
mov eax, dword [esp + 0x28]
push 0
push 0x80
push 4
push 0
push 0
add eax, 4
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4a6cf1
mov eax, dword [0x51dc90]
test eax, eax
jne 0x4a6a34
mov ecx, 0x51dc90
call fcn.004b8f30
test al, al
je 0x4a6a46
mov eax, dword [0x51dc90]
push 0
push eax
push 0
push 0
push 4
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
mov edx, 1
mov ecx, edi
call fcn.004b93d0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0x19000
jl 0x4a6be5
push 0xf000
call fcn.0044c93c
push 0xf000
mov esi, eax
push 0
push esi
call fcn.0044eee0
add esp, 0x10
push 0
push 0
push 0xf000
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4a6b83
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0xf000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a6b83
cmp dword [esp + 0x14], 0
je 0x4a6b83
push edi
call ebx
mov ecx, dword [esp + 0x28]
push 0
push 0x80
push 2
push 0
push 0
lea eax, [ecx + 4]
push 0xc0000000
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a6b09
push esi
call fcn.0044c4be
add esp, 4
jmp 0x4a6cf1
push ecx
mov edx, 1
mov ecx, edi
call fcn.004b9490
add esp, 4
mov edx, 1
mov ecx, edi
call fcn.004b93d0
push 0
lea eax, [esp + 0x1c]
mov word [esp + 0x10], 0xfeff
push eax
push 2
lea eax, [esp + 0x18]
mov dword [esp + 0x24], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x18], 2
je 0x4a6b5b
push esi
call fcn.0044c4be
jmp 0x4a6ceb
push 0
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x1c]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
je 0x4a6bd8
push esi
call fcn.0044c4be
jmp 0x4a6ceb
push edi
call ebx
mov ecx, dword [esp + 0x28]
push 0
push 0x80
push 2
push 0
push 0
lea eax, [ecx + 4]
push 0xc0000000
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a6bbc
push esi
call fcn.0044c4be
add esp, 4
jmp 0x4a6cf1
push ecx
mov edx, 1
mov ecx, edi
call fcn.004b9490
add esp, 4
mov edx, 1
mov ecx, edi
call fcn.004b93d0
push esi
call fcn.0044c4be
mov esi, dword [esp + 0x20]
add esp, 4
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4a6cee
test eax, eax
jne 0x4a6c29
push eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
push 2
lea eax, [esp + 0x1c]
mov word [esp + 0x1c], 0xfeff
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x1c], 2
jne 0x4a6cee
lea ecx, [esp + 0x40]
call fcn.004a6070
sub esp, 0xc
lea eax, [esp + 0x4c]
mov ecx, esi
push eax
call fcn.004a7900
lea ecx, [esp + 0x30]
call fcn.004a6070
push str._Y__M__D__W___h:_m:_s
push 0
call fcn.004787ef
add esp, 4
lea ecx, [esp + 0x34]
push edx
push eax
call fcn.004a4a30
push 0x4e488c
lea eax, [esp + 0x34]
push 0x4e3d38
push eax
call fcn.004a4cb0
mov eax, dword [esp + 0x54]
add eax, 4
push eax
lea eax, [esp + 0x40]
push 0x4e3d38
push eax
call fcn.004a4cb0
push 0x4e4890
lea eax, [esp + 0x4c]
push 0x4e3d38
push eax
call fcn.004a4cb0
mov eax, dword [esp + 0x58]
add esp, 0x24
mov dword [esp + 0x1c], 0
lea esi, [eax + eax]
push 0
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x40]
push esi
add eax, 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4a6cdd
push eax
call fcn.00459651
add esp, 4
mov eax, dword [esp + 0x48]
test eax, eax
je 0x4a6cee
push eax
call fcn.00459651
add esp, 4
push edi
call ebx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4a6d02
push eax
call fcn.00459651
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8