Function at 0x12fda0c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x50
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
push edi
mov dword [0x131c97c0], ebx
call esi
mov ebp, dword [esp + 0x64]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x131c97c8], eax
lea eax, [esp + 0x10]
push 1
push eax
push ebx
push ebp
mov dword [esp + 0x20], ebx
call edi
push ebx
push ebx
push ebx
push ebp
mov dword [esp + 0x2c], eax
call edi
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor ecx, ecx
cmp ebp, 0xffffffff
mov word [esp + 0x65], cx
mov dword [esp + 0x14], ebx
stosb byte es:[edi], al
mov byte [esp + 0x64], bl
mov byte [esp + 0x67], cl
je 0x12fda18b
lea edx, [esp + 0x64]
test edx, edx
je 0x12fda18b
mov edi, dword [sym.imp.KERNEL32.dll_GetFileType]
push ebp
call edi
cmp eax, 1
jne 0x12fda2b3
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x18]
push ebx
push eax
lea ecx, [esp + 0x6c]
push 4
push ecx
push ebp
mov dword [esp + 0x78], ebx
mov dword [esp + 0x2c], ebx
call esi
test eax, eax
jne 0x12fda1ab
mov dword [0x131c97c0], 0xd
mov dword [0x131c97c4], 0x2251
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c97c8], eax
jmp 0x12fda2b3
mov dword [0x131c97c0], 1
mov dword [0x131c97c4], 0x2244
call esi
mov dword [0x131c97c8], eax
jmp 0x12fda2b3
lea eax, [esp + 0x64]
mov edx, 0x13182cc0
mov ecx, dword [eax]
mov eax, dword [edx]
cmp ecx, eax
jne 0x12fda2b3
lea edx, [esp + 0x24]
test edx, edx
je 0x12fda21d
push ebp
call edi
cmp eax, 1
jne 0x12fda2b3
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x24]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x28]
push eax
push 0x3c
push ecx
push ebp
mov dword [esp + 0x2c], ebx
call esi
test eax, eax
jne 0x12fda23e
mov dword [0x131c97c0], 0xd
mov dword [0x131c97c4], 0x2251
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c97c8], eax
jmp 0x12fda2b3
mov dword [0x131c97c0], 1
mov dword [0x131c97c4], 0x2244
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c97c8], eax
jmp 0x12fda2b3
mov edx, dword [esp + 0x64]
mov ecx, 4
mov edi, 0x13182cc0
lea esi, [esp + 0x20]
xor eax, eax
mov dword [esp + 0x20], edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x12fda2b3
cmp word [esp + 0x50], 0x40
jne 0x12fda2b3
mov eax, dword [esp + 0x40]
cmp eax, 0x40001
je 0x12fda274
cmp eax, 0x40002
jne 0x12fda2b3
cmp word [esp + 0x5e], 0x50
jne 0x12fda2b3
mov esi, dword [esp + 0x54]
lea ecx, [esp + 0x20]
push esi
push 0x40
push ecx
mov dword [esp + 0x60], ebx
call fcn.12fedb70
add esp, 0xc
cmp eax, ebx
mov dword [esp + 0x54], esi
je 0x12fda2b3
mov edi, dword [esp + 0x68]
mov ecx, 0x10
lea esi, [esp + 0x20]
mov dword [esp + 0x14], 1
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push ebx
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
cmp eax, ebx
pop ebx
jne 0x12fda2f6
mov dword [0x131c97c0], 0xf
mov dword [0x131c97c4], 0x2e48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c97c8], eax
xor eax, eax
add esp, 0x50
ret
mov eax, 1
add esp, 0x50
ret