Function at 0x12fc18b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x77c
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [0x131c8f38], 0
call esi
mov ebx, dword [esp + 0x790]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push ebx
mov dword [0x131c8f40], eax
call ebp
mov ecx, 0xf7
xor eax, eax
lea edi, [esp + 0x3ad]
mov byte [esp + 0x3ac], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp ebx, 0xffffffff
stosb byte es:[edi], al
je 0x12fc1966
lea eax, [esp + 0x3ac]
test eax, eax
je 0x12fc1966
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fc1981
mov ecx, 0xf8
xor eax, eax
lea edi, [esp + 0x3ac]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x3b0]
push ecx
push 0x3e0
push edx
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fc19a9
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
jmp 0x12fc197a
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
call esi
mov dword [0x131c8f40], eax
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x39a1
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x77c
ret
lea eax, [esp + 0x3ac]
push eax
call fcn.12fba750
add esp, 4
test eax, eax
jne 0x12fc1a0a
push eax
push eax
lea ecx, [esp + 0x3b4]
push eax
push ecx
call fcn.12fb92e0
add esp, 0x10
cmp eax, 4
je 0x12fc1b00
cmp eax, 3
je 0x12fc1b00
mov dword [0x131c8f38], 0x22
mov dword [0x131c8f3c], 0x39ae
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x77c
ret
cmp eax, 3
je 0x12fc1a37
mov dword [0x131c8f38], 0x1f
mov dword [0x131c8f3c], 0x39b5
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x77c
ret
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x24]
lea eax, [esp + 0x3ac]
push edx
push eax
call fcn.12fb9df0
add esp, 8
test eax, eax
jne 0x12fc1a8d
mov dword [0x131c8f38], 0x14
mov dword [0x131c8f3c], 0x39be
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x77c
ret
mov edi, dword [esp + 0x794]
test edi, edi
je 0x12fc1adc
mov ecx, 0x388
lea esi, [esp + 0x24]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x12fc1aac
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x12fc1adc
mov dword [0x131c8f38], 0x14
mov dword [0x131c8f3c], 0x39c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x77c
ret
mov ecx, dword [esp + 0x5c]
push 0
push 0
push ecx
push ebx
call ebp
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], 1
test eax, eax
mov dword [esp + 0x10], 0
jne 0x12fc1b10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x77c
ret
mov edx, dword [esp + 0x64]
cmp eax, 1
mov dword [esp + 0x18], edx
jne 0x12fc1b25
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
push ecx
call fcn.12f5bf8b
mov esi, eax
add esp, 4
test esi, esi
jne 0x12fc1b64
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x39e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x77c
ret
xor eax, eax
jmp 0x12fc1b6c
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x60]
mov ebp, dword [esp + 0x64]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jne 0x12fc1b89
mov ebp, dword [esp + 0x68]
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x18]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
lea eax, [esp + 0x20]
push edi
push eax
push ebp
push esi
push ebx
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fc1bd7
mov ecx, dword [esi]
add ebp, 0xfffffffc
push ecx
lea edx, [esi + 4]
push ebp
push edx
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fc1bed
cmp dword [esp + 0x10], edi
je 0x12fc1b68
jmp 0x12fc1c10
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x39f8
jmp 0x12fc1c01
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x3a00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x14], edi
push esi
call fcn.12f5bf80
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x77c
ret