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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100acbb8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x100de040]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x38], 8
jb 0x1001a835
mov eax, dword [ebx + 0x24]
jmp 0x1001a838
lea eax, [ebx + 0x24]
xor esi, esi
push esi
push esi
push 4
push esi
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x50], esi
cmp edi, 0xffffffff
jne 0x1001a866
call fcn.10002d30
jmp 0x1001aa1f
lea eax, [esp + 0x1c]
push eax
push edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1001a893
call fcn.10002d30
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x1001aa1f
cmp dword [esp + 0x20], esi
mov eax, dword [esp + 0x1c]
jl 0x1001a8b7
jg 0x1001a8a6
cmp eax, 0x100000
jbe 0x1001a8b7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x1001aa1f
add eax, 0x200
push 0x100e33b4
push eax
call fcn.100628bb
mov esi, eax
add esp, 8
mov dword [esp + 0x10], esi
mov byte [esp + 0x50], 1
test esi, esi
jne 0x1001a8ea
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x1001aa1f
mov ecx, dword [esp + 0x1c]
add ecx, 0x200
push ecx
push 0
push esi
call fcn.10064e10
mov eax, dword [esp + 0x28]
add esp, 0xc
push 0
lea edx, [esp + 0x1c]
push edx
push eax
push esi
push edi
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1001a940
call fcn.10002d30
mov edi, eax
lea esi, [esp + 0x10]
call fcn.10008990
lea esi, [esp + 0x14]
call fcn.1000fee0
mov eax, edi
jmp 0x1001aa1f
cmp dword [esp + 0x18], 0
jne 0x1001a963
lea esi, [esp + 0x10]
call fcn.10008990
lea esi, [esp + 0x14]
call fcn.1000fee0
mov eax, 0x80004005
jmp 0x1001aa1f
push esi
lea ecx, [esp + 0x28]
call fcn.10002100
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [esp + 0x28]
mov ecx, ebx
mov byte [esp + 0x54], 2
call fcn.1001abf0
mov ebx, eax
test ebx, ebx
jl 0x1001aa02
cmp ebx, 1
je 0x1001aa02
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1001a9b4
call fcn.10002d30
lea ecx, [esp + 0x24]
mov edi, eax
call fcn.10002140
jmp 0x1001a927
cmp dword [esp + 0x3c], 0x10
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], 0
jae 0x1001a9cb
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x38]
push 0
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001a99f
lea ecx, [esp + 0x24]
call fcn.10002140
lea esi, [esp + 0x10]
call fcn.10008990
lea esi, [esp + 0x14]
call fcn.1000fee0
xor eax, eax
jmp 0x1001aa1f
lea ecx, [esp + 0x24]
call fcn.10002140
lea esi, [esp + 0x10]
call fcn.10008990
lea esi, [esp + 0x14]
call fcn.1000fee0
mov eax, ebx
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.10062448
mov esp, ebp
pop ebp
ret 8