Function at 0x12fdb1a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [0x131c96c0], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0x30]
mov dword [0x131c96c8], eax
lea eax, [esp + 0x10]
push 1
push eax
push esi
push edi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], esi
cmp dword [ebp], esi
jne 0x12fdb23a
mov edx, dword [esp + 0x38]
xor ecx, ecx
mov bx, word [edx + 0xc]
cmp bx, si
mov dword [esp + 0x48], ebx
jbe 0x12fdb3ab
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
mov eax, ecx
and eax, 0xffff
lea eax, [eax + eax*4]
cmp dword [esi + eax*8], edx
lea eax, [esi + eax*8]
jne 0x12fdb220
mov bl, byte [esp + 0x44]
cmp byte [eax + 4], bl
je 0x12fdb22b
mov ebx, dword [esp + 0x48]
inc ecx
cmp cx, bx
jb 0x12fdb201
jmp 0x12fdb3ab
and ecx, 0xffff
lea ecx, [ecx + ecx*4]
lea edx, [esi + ecx*8]
mov dword [ebp], edx
mov eax, dword [ebp]
push 0
push 0
mov ecx, dword [eax + 0x10]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp]
mov esi, dword [esp + 0x4c]
push 0xffffffffffffffff
mov ecx, esi
mov eax, dword [edx + 0xc]
push eax
call fcn.12f925c0
mov ecx, esi
call fcn.12f925b0
mov ecx, esi
mov ebx, eax
call fcn.12f92cd0
cmp edi, 0xffffffff
mov dword [esp + 0x44], eax
je 0x12fdb2ef
test eax, eax
je 0x12fdb2ef
test ebx, ebx
je 0x12fdb2ef
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fdb3ab
mov edi, dword [esp + 0x44]
mov ecx, ebx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x30]
and ecx, 3
push 0
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x4c]
push eax
push ebx
push ecx
push edx
mov dword [esp + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fdb313
mov dword [0x131c96c0], 0xd
mov dword [0x131c96c4], 0x2251
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c96c8], eax
jmp 0x12fdb3a7
mov dword [0x131c96c0], 1
mov dword [0x131c96c4], 0x2244
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c96c8], eax
jmp 0x12fdb3ab
mov ecx, esi
call fcn.12f925b0
push eax
mov ecx, esi
call fcn.12f92cd0
push eax
mov eax, dword [esp + 0x3c]
push eax
call fcn.12fdb940
add esp, 0xc
test eax, eax
je 0x12fdb3a7
mov ecx, esi
call fcn.12f92cb0
mov edx, dword [ebp]
mov ecx, dword [eax]
cmp dword [edx + 0xc], ecx
jb 0x12fdb3a7
test byte [edx + 8], 4
je 0x12fdb38d
xor edx, edx
mov byte [esp + 0x1c], 0
mov dword [esp + 0x1d], edx
mov dword [esp + 0x21], edx
mov dword [esp + 0x25], edx
mov word [esp + 0x29], dx
mov byte [esp + 0x2b], dl
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
push 1
call fcn.13032f00
mov edi, dword [ebp]
mov ecx, 4
add edi, 0x18
lea esi, [esp + 0x1c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
sete al
jmp 0x12fdb39b
mov edx, dword [edx + 0x18]
push edx
push ecx
push eax
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fdb3a7
mov dword [esp + 0x14], 1
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
jne 0x12fdb3ef
mov dword [0x131c96c0], 0xf
mov dword [0x131c96c4], 0x30dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c96c8], eax
xor eax, eax
add esp, 0x1c
ret
mov eax, 1
add esp, 0x1c
ret