Function at 0x12fc2270
Capabilities:
Get file attributes
Read file on windows

Disassembly:
sub esp, 0x7ec
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov dword [0x131c8f38], ebx
call edi
mov esi, dword [esp + 0x800]
mov dword [0x131c8f40], eax
cmp esi, ebx
je 0x12fc2b9d
cmp word [esi], bx
je 0x12fc2b9d
cmp dword [esp + 0x804], ebx
je 0x12fc2b9d
mov ebp, dword [esp + 0x808]
cmp ebp, ebx
je 0x12fc2b9d
cmp dword [ebp], ebx
je 0x12fc2b9d
cmp dword [0x131c8f44], ebx
jne 0x12fc22fc
mov dword [0x131c8f38], 2
mov dword [0x131c8f3c], 0x3b06
call edi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7ec
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x12fc232f
mov dword [0x131c8f38], 0x1d
mov dword [0x131c8f3c], 0x3b0e
call edi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7ec
ret
mov eax, dword [ebp]
push ebx
push 0x80
push 3
push ebx
push 5
push SysReAllocStringLen
push esi
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], eax
call fcn.12fee850
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x12fc2a47
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0xf7
xor eax, eax
lea edi, [esp + 0x41d]
mov byte [esp + 0x41c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x41c]
test ecx, ecx
stosb byte es:[edi], al
je 0x12fc241b
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fc23f7
mov ecx, 0xf8
xor eax, eax
lea edi, [esp + 0x41c]
lea edx, [esp + 0x28]
rep stosd dword es:[edi], eax
push ebx
push edx
lea eax, [esp + 0x424]
push 0x3e0
push eax
push ebp
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fc2431
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x3b30
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
jmp 0x12fc23ec
lea ecx, [esp + 0x41c]
push ecx
call fcn.12fba750
mov edx, eax
add esp, 4
cmp edx, ebx
je 0x12fc2a64
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x55]
mov byte [esp + 0x54], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0x95]
mov byte [esp + 0x94], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp edx, 3
mov dword [esp + 0x24], ebx
stosb byte es:[edi], al
jne 0x12fc2640
lea edx, [esp + 0x94]
lea eax, [esp + 0x41c]
push edx
push eax
call fcn.12fb9df0
add esp, 8
test eax, eax
je 0x12fc2a85
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f38], ebx
call edi
lea ecx, [esp + 0x94]
mov dword [0x131c8f40], eax
test ecx, ecx
jne 0x12fc2501
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x3745
call edi
mov dword [0x131c8f40], eax
mov dword [0x131c8f38], 0x1f
mov dword [0x131c8f3c], 0x3b4f
call edi
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
cmp dword [0x131c8f44], ebx
jne 0x12fc251f
mov dword [0x131c8f38], 2
mov dword [0x131c8f3c], 0x374b
jmp 0x12fc24da
cmp dword [0x131c94f4], ebx
jne 0x12fc2576
mov eax, dword [esp + 0x280]
mov edx, dword [esp + 0x288]
mov ecx, dword [0x131c8f54]
cmp eax, 0x2710
ja 0x12fc2554
cmp ecx, 0x2710
ja 0x12fc2576
cmp ecx, eax
je 0x12fc2576
cmp eax, ebx
jne 0x12fc2564
jmp 0x12fc2576
cmp eax, ecx
jne 0x12fc2564
cmp dword [0x131c8f5c], ebx
ja 0x12fc2576
cmp edx, ebx
je 0x12fc2576
push edx
push eax
call fcn.12fc04c0
add esp, 8
cmp eax, ebx
je 0x12fc24e1
lea edx, [esp + 0x24]
lea eax, [esp + 0x54]
push edx
push 0x40
lea ecx, [esp + 0x4c]
push eax
lea edx, [esp + 0xa0]
push ecx
push edx
mov dword [esp + 0x58], ebx
call fcn.12fc0eb0
add esp, 0x14
test eax, eax
je 0x12fc2aa9
mov eax, dword [esp + 0x44]
push eax
call fcn.12ff0660
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x20], esi
je 0x12fc2ac9
mov eax, dword [esp + 0xcc]
push ebx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x10], ebx
cmp eax, ebx
mov dword [esp + 0x40], ebx
je 0x12fc298b
mov edi, dword [esp + 0xd4]
cmp eax, 1
mov dword [esp + 0x30], edi
jne 0x12fc2603
mov ecx, dword [esp + 0xd8]
mov dword [esp + 0x30], ecx
mov edi, ecx
push edi
call fcn.12f5bf8b
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x3c], ebx
je 0x12fc2b31
mov edx, dword [esi]
push edi
mov ecx, esi
call dword [edx + 0xc]
push eax
mov dword [esp + 0x4c], eax
call fcn.12f5bf8b
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x12fc2b55
xor eax, eax
jmp 0x12fc27d2
cmp edx, 1
jne 0x12fc2768
push edx
call fcn.12ff0660
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x20], esi
je 0x12fc2ae9
push ebx
push ebx
push 0x100
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x10000
call fcn.12f5bf8b
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x12fc2a1f
push 0x10000
call fcn.12f5bf8b
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x12fc2a1b
mov dword [esp + 0x10], 0
mov ecx, 0x4000
xor eax, eax
mov edi, ebx
mov dword [esp + 0x28], eax
rep stosd dword es:[edi], eax
mov ecx, 0x4000
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
push 0x10000
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fc2998
mov eax, dword [esp + 0x28]
test eax, eax
je 0x12fc29fc
lea ecx, [esp + 0x2c]
mov edx, dword [esi]
push ecx
push 0x10000
push ebp
push eax
mov eax, dword [esp + 0x34]
push ebx
lea ecx, [esp + 0x68]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x48], 0
call dword [edx + 0x14]
test eax, eax
je 0x12fc29ae
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
cmp eax, ecx
jbe 0x12fc29d7
mov edx, dword [esp + 0x804]
mov eax, ecx
mov esi, ebp
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add edi, eax
add edx, eax
sub ecx, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x804], edx
mov dword [esp + 0x1c], ecx
jmp 0x12fc26a4
cmp edx, 2
jne 0x12fc2b79
push edx
call fcn.12ff0660
add esp, 4
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x12fc2b0d
mov edi, 0x13182818
or ecx, 0xffffffff
xor eax, eax
mov esi, 0x13182818
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x54]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x13182818
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov esi, dword [esp + 0x20]
not ecx
dec ecx
mov dword [esp + 0x24], ecx
jmp 0x12fc2660
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x50]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0xd0]
mov esi, dword [esp + 0xd4]
inc eax
cmp eax, ecx
mov dword [esp + 0x50], eax
jne 0x12fc27f8
mov esi, dword [esp + 0xd8]
mov dword [esp + 0x40], 1
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
mov dword [esp + 0x50], 0
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x4c]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x50]
push eax
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fc28e8
mov edx, dword [ebx]
add esi, 0xfffffffc
lea edi, [ebx + 4]
push edx
push esi
push edi
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fc28fe
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x4c]
mov eax, dword [ecx]
push edx
mov edx, dword [esp + 0x2c]
push ebp
push esi
push edi
push edx
lea edx, [esp + 0x6c]
push edx
mov dword [esp + 0x54], 0
call dword [eax + 0x14]
test eax, eax
je 0x12fc2914
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
cmp ebx, ecx
jbe 0x12fc293d
mov edx, dword [esp + 0x804]
mov eax, ecx
mov esi, ebp
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
add edi, eax
add edx, eax
sub ebx, eax
mov eax, dword [esp + 0x40]
test eax, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x804], edx
mov dword [esp + 0x1c], ebx
je 0x12fc27c6
jmp 0x12fc2968
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x3bbc
jmp 0x12fc2928
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x3bc4
jmp 0x12fc2928
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x3bcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x10], 1
jmp 0x12fc296c
mov edi, dword [esp + 0x804]
mov ecx, ebx
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, edx
and ecx, 3
add eax, ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x3c]
push ebx
call fcn.12f5bf80
push ebp
call fcn.12f5bf80
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
jne 0x12fc2a1b
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x34], 1
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x3c0d
jmp 0x12fc29c2
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x3c1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x10], 1
jmp 0x12fc29fc
mov edi, dword [esp + 0x804]
mov ecx, eax
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x10], 0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [esp + 0x14], eax
push ebx
call fcn.12f5bf80
push ebp
call fcn.12f5bf80
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
jne 0x12fc2a1b
mov dword [esp + 0x34], 1
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x808]
mov ecx, dword [esp + 0x14]
cmp ebp, 0xffffffff
mov dword [eax], ecx
je 0x12fc2a38
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7ec
ret
mov dword [0x131c8f38], 3
mov dword [0x131c8f3c], 0x3b26
call edi
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0x22
mov dword [0x131c8f3c], 0x3b37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0x14
mov dword [0x131c8f3c], 0x3b46
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0xb
mov dword [0x131c8f3c], 0x3b58
call edi
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x3b61
call edi
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x3b6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x3b77
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x3b9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x3ba3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1b
mov dword [0x131c8f38], 0x22
mov dword [0x131c8f3c], 0x3b81
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fc2a1f
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x3b00
call edi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7ec
ret