Function at 0x1001a3f0
Capabilities:
Clear file content
Copy file
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x658
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x654], eax
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x664]
push esi
push edi
xor ebx, ebx
push 0xec
mov dword [esp + 0x645], eax
mov dword [esp + 0x649], eax
mov dword [esp + 0x64d], eax
mov dword [esp + 0x651], eax
mov dword [esp + 0x655], eax
mov dword [esp + 0x659], eax
mov dword [esp + 0x65d], eax
mov dword [esp + 0x661], eax
mov word [esp + 0x665], ax
mov byte [esp + 0x667], al
lea eax, [esp + 0x38]
push ebx
push eax
mov esi, ecx
mov byte [esp + 0x64c], bl
mov dword [esp + 0x3c], ebx
call fcn.100d4cc0
add esp, 0xc
push 0x50e
lea ecx, [esp + 0x130]
push ebx
push ecx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x134], ebx
call fcn.100d4cc0
add esp, 0xc
cmp esi, ebx
je 0x1001a7d6
cmp ebp, ebx
je 0x1001a7d6
cmp dword [0x101d31d0], ebx
jne 0x1001a4bb
call fcn.10019810
cmp dword [0x101d3292], ebx
je 0x1001a7d6
cmp dword [0x101d3296], ebx
je 0x1001a7d6
lea edx, [esp + 0x128]
push edx
mov ecx, esi
call fcn.10019ca0
test eax, eax
je 0x1001a7d6
mov edi, dword [esp + 0x128]
cmp edi, 0xc
jne 0x1001a4ff
xor eax, eax
mov dword [0x101d31d4], eax
jmp 0x1001a51b
lea ecx, [esp + 0x58e]
call fcn.1001a2e0
mov dword [0x101d31d4], eax
cmp eax, 0x1f7
jae 0x1001a7d6
push edi
lea edx, [esp + 0x644]
lea ecx, [esp + 0x5ba]
mov ebx, eax
call fcn.1001a330
xor ebx, ebx
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x1001a7d6
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x644]
push 0x100
push ecx
call fcn.1006c040
add esp, 0xc
test eax, eax
jne 0x1001a7d6
lea eax, [esp + 0x380]
lea edx, [eax + 2]
jmp 0x1001a570
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x1001a570
sub eax, edx
sar eax, 1
je 0x1001a5ab
push ebp
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x10129ee0
mov eax, 0x208
mov edi, ebp
call fcn.100044f0
lea edx, [esp + 0x380]
push edx
mov eax, 0x208
call fcn.100044f0
mov eax, dword [esp + 0x128]
cmp eax, 0xb
je 0x1001a5c5
cmp eax, 0xd
je 0x1001a5c5
cmp eax, 0xe
jne 0x1001a78f
cmp dword [esp + 0x33c], ebx
je 0x1001a78f
cmp dword [esp + 0x34c], 3
jne 0x1001a78f
cmp dword [esp + 0x350], 0x40000
jne 0x1001a78f
push ebx
push ebp
push esi
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [esp + 0x33c]
mov eax, dword [esp + 0x378]
mov edi, dword [0x101d3292]
xor edx, edx
sub eax, ecx
mov ecx, dword [esp + 0x37c]
sbb ecx, edx
add eax, 0x38
push 0xc0000
push ebx
adc ecx, ebx
push ecx
push eax
mov eax, esi
call fcn.100198c0
test eax, eax
jbe 0x1001a968
mov eax, dword [0x101d328e]
mov ecx, dword [0x101d3296]
push eax
push ebx
push ecx
call fcn.100d4cc0
mov ecx, dword [0x101d3296]
add esp, 0xc
push ebx
lea edx, [esp + 0x5a6]
push edx
mov edx, dword [0x101d3292]
lea eax, [esp + 0x38]
push eax
push 0xc0000
push ecx
push edx
call fcn.1006c050
add esp, 0x18
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001a7d6
mov eax, dword [esp + 0x364]
mov ecx, dword [esp + 0x360]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
push ebx
push eax
push ecx
push esi
call edi
mov eax, dword [0x101d3296]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x18]
push edx
push 0x40000
push eax
push esi
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call ebp
mov ecx, dword [esp + 0x36c]
mov edx, dword [esp + 0x368]
push 0
push 0
push ecx
push edx
push esi
mov dword [esp + 0x28], 0
call edi
mov ecx, dword [0x101d3296]
push 0
lea eax, [esp + 0x18]
push eax
push 0x40000
add ecx, 0x40000
push ecx
push esi
call ebx
push esi
call ebp
mov edx, dword [esp + 0x374]
mov eax, dword [esp + 0x370]
push 0
push 0
push edx
push eax
push esi
call edi
mov edx, dword [0x101d3296]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x40000
add edx, 0x80000
push edx
push esi
call ebx
push esi
call ebp
mov eax, dword [esp + 0x37c]
mov ebx, dword [esp + 0x33c]
xor ecx, ecx
cmp eax, ecx
jl 0x1001a782
mov edx, dword [esp + 0x378]
jg 0x1001a76e
cmp edx, ebx
jbe 0x1001a782
push 0
sub edx, ebx
push 0
sbb eax, ecx
push eax
push edx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x28]
jmp 0x1001a7d8
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
push esi
call edi
mov esi, eax
mov dword [esp + 0x2c], esi
cmp esi, 0xffffffff
je 0x1001a7d6
lea eax, [esp + 0x18]
push eax
push esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov dword [esp + 0x28], eax
cmp eax, ebx
jne 0x1001a7f3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100d0738
add esp, 0x658
ret 4
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x10000000
push ebp
call edi
mov edi, eax
mov dword [esp + 0x24], edi
cmp edi, 0xffffffff
je 0x1001a7d6
mov ecx, dword [esp + 0x636]
mov edx, dword [esp + 0x5b2]
lea eax, [edx + ecx]
mov edx, dword [esp + 0x1c]
add eax, dword [esp + 0x12c]
xor ecx, ecx
cmp edx, ecx
mov dword [esp + 0x14], ebx
jl 0x1001a95c
jg 0x1001a856
mov ecx, dword [esp + 0x18]
cmp ecx, eax
jbe 0x1001a95c
jmp 0x1001a856
mov esi, dword [esp + 0x2c]
xor ebx, ebx
mov eax, dword [0x101d3292]
push ebx
lea edx, [esp + 0x18]
push edx
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [0x101d3296]
push 0x1000
push ebx
push ecx
call fcn.100d4cc0
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ebx
lea edx, [esp + 0x5a6]
push edx
mov edx, dword [0x101d3296]
lea eax, [esp + 0x38]
push eax
mov eax, dword [0x101d3292]
push ecx
push edx
push eax
call fcn.1006c050
mov ecx, dword [esp + 0x64e]
mov ebp, dword [esp + 0x5ca]
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
lea edx, [ecx + ebp]
add edx, dword [esp + 0x144]
xor edi, edi
add esp, 0x18
mov ecx, esi
sub ecx, ebx
sbb eax, edi
cmp eax, edi
jg 0x1001a8f7
jl 0x1001a8e1
cmp ecx, edx
jae 0x1001a8f7
sub esi, ebp
sub esi, dword [esp + 0x636]
sub esi, dword [esp + 0x12c]
mov ebx, esi
mov dword [esp + 0x14], ebx
mov eax, dword [0x101d3296]
mov ecx, dword [esp + 0x24]
push 0
lea edx, [esp + 0x18]
push edx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x28], eax
test eax, eax
je 0x1001a925
mov edx, dword [esp + 0x14]
sub dword [esp + 0x18], edx
sbb dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x5b2]
mov eax, dword [esp + 0x636]
add eax, ecx
add eax, dword [esp + 0x12c]
xor ecx, ecx
cmp dword [esp + 0x1c], ecx
jg 0x1001a850
jl 0x1001a954
cmp dword [esp + 0x18], eax
ja 0x1001a850
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
mov eax, dword [esp + 0x28]
jmp 0x1001a7d8