Function at 0x12eb43c0
Capabilities:
Access peb ldr_data
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x13064bc0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
push 0x13198dc0
lea ecx, [esp + 0xc]
or ebp, 0xffffffff
call fcn.12f41640
mov eax, dword [esp + 0x30]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x28], ebx
je 0x12eb45c4
cmp word [eax], bx
je 0x12eb45c4
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x12eb45c4
lea eax, [esp + 0x1c]
mov dword [esp + 0xc], ebx
push eax
push ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
cmp ecx, ebx
ja 0x12eb4453
cmp eax, 0x6400000
jb 0x12eb446c
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
push esi
mov esi, dword [esp + 0x38]
push edi
push 0xfde9
lea ecx, [esp + 0x3c]
push esi
push ecx
call fcn.12eb45f0
add esp, 0xc
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 1
call fcn.12f420f0
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], bl
call fcn.12f41f70
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, eax
or edx, ecx
je 0x12eb4575
cmp esi, ebx
je 0x12eb456f
mov eax, dword [esp + 0x10]
mov esi, dword [eax - 8]
add esi, 3
push esi
mov dword [esp + 0x20], esi
call fcn.12f5c05b
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x3c], edi
je 0x12eb456b
mov ecx, esi
xor eax, eax
mov edx, ecx
push ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x1c], ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x40]
lea eax, [esp + 0x1c]
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
mov word [esp + 0x39], bx
cmp eax, esi
mov byte [esp + 0x38], 0xef
mov byte [esp + 0x39], 0xbb
mov byte [esp + 0x3a], 0xbf
jne 0x12eb4550
mov esi, dword [esp + 0x3c]
mov ecx, 3
lea edi, [esp + 0x38]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x12eb4550
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x10]
lea ecx, [eax - 3]
lea edi, [edx + 3]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x12eb456b
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
jmp 0x12eb4575
mov eax, dword [esp + 0x20]
or eax, dword [esp + 0x24]
jne 0x12eb45b7
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x14]
push ebx
push ecx
lea edx, [esp + 0x40]
push 3
push edx
mov word [esp + 0x49], bx
push ebp
mov byte [esp + 0x4c], 0xef
mov byte [esp + 0x4d], 0xbb
mov byte [esp + 0x4e], 0xbf
call esi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ebx
lea edx, [esp + 0x14]
push ebx
mov ecx, dword [eax - 8]
push edx
push ecx
push eax
push ebp
call esi
jmp 0x12eb45c2
push 2
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
pop esi
lea ecx, [esp + 8]
mov dword [esp + 0x28], 0xffffffff
call fcn.12f41f70
mov ecx, dword [esp + 0x20]
mov eax, ebp
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret