Function at 0x12fb5c00
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x4ec
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
xor edi, edi
mov dword [0x131c8f38], edi
call esi
mov ebp, dword [esp + 0x500]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x131c8f40], eax
lea eax, [esp + 0x18]
push 1
push eax
push edi
push ebp
mov dword [esp + 0x28], edi
call ebx
push edi
push edi
push edi
push ebp
mov dword [esp + 0x2c], eax
call ebx
mov ecx, 0x105
xor eax, eax
lea edi, [esp + 0xe5]
mov byte [esp + 0xe4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp ebp, 0xffffffff
stosb byte es:[edi], al
je 0x12fb5ccb
lea ecx, [esp + 0xe4]
test ecx, ecx
je 0x12fb5ccb
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fb5ce6
mov ecx, 0x106
xor eax, eax
lea edi, [esp + 0xe4]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], eax
push eax
push edx
lea eax, [esp + 0xec]
push 0x418
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fb5cc4
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
jmp 0x12fb5cdf
mov esi, 1
jmp 0x12fb5ce8
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
call esi
mov dword [0x131c8f40], eax
xor esi, esi
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push 0
push ecx
push edx
push ebp
call ebx
test esi, esi
jne 0x12fb5d27
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x1fb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4ec
ret
lea eax, [esp + 0xe4]
test eax, eax
je 0x12fb5dff
push 0x10
lea ecx, [esp + 0xe8]
push 0x1318284c
push ecx
call fcn.12f5e5f0
add esp, 0xc
test eax, eax
jne 0x12fb5db2
mov eax, 3
cmp eax, 3
mov esi, 1
jne 0x12fb5fb3
mov eax, dword [esp + 0x118]
lea ecx, [esp + 0xe4]
push eax
push 0x34
push ecx
call fcn.12fedaa0
add esp, 0xc
test eax, eax
jne 0x12fb5e2b
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x1fc7
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4ec
ret
mov edi, 0x131827b4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xe4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x131827b4
push edx
call fcn.12f5e5f0
add esp, 0xc
test eax, eax
jne 0x12fb5dff
mov eax, dword [esp + 0x124]
test eax, eax
jne 0x12fb5df0
mov eax, 1
jmp 0x12fb5d56
cmp eax, 1
jne 0x12fb5dff
mov eax, 2
jmp 0x12fb5d56
mov dword [0x131c8f38], 0x23
mov dword [0x131c8f3c], 0x1fbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4ec
ret
mov eax, dword [esp + 0x110]
mov ecx, dword [esp + 0x508]
mov edi, eax
cmp ecx, eax
mov dword [esp + 0x20], edi
jae 0x12fb5e8c
mov ecx, dword [esp + 0x50c]
test ecx, ecx
je 0x12fb5e50
mov dword [ecx], eax
mov esi, dword [esp + 0x504]
test esi, esi
je 0x12fb5e7a
mov dword [0x131c8f38], 0x20
mov dword [0x131c8f3c], 0x1fd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebp
sete al
pop ebx
add esp, 0x4ec
ret
cmp eax, 0x3e0
mov dword [esp + 0x10], 0
lea ebx, [esp + 0x11c]
jbe 0x12fb5f42
push eax
xor esi, esi
call fcn.12f5bf8b
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x12fb6414
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 esi
and ecx, 3
push esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x114]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push ebp
mov dword [esp + 0x20], 1
call edi
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push esi
push ecx
push edx
push ebx
push ebp
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fb5f0c
mov esi, 1
jmp 0x12fb5f2b
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x1feb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push 0
push eax
push ecx
push ebp
call edi
test esi, esi
je 0x12fb5f9d
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x50c]
mov eax, dword [esp + 0x508]
mov ecx, dword [esp + 0x504]
push edx
push eax
push ecx
push edi
lea edx, [esp + 0xf4]
push ebx
push edx
call fcn.12fc0d50
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x12fb5f91
mov dword [0x131c8f38], 0x18
mov dword [0x131c8f3c], 0x1ff7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x12fb6414
push ebx
call fcn.12f5bf80
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4ec
ret
cmp eax, 2
je 0x12fb5fc1
cmp eax, 1
jne 0x12fb6414
cmp dword [esp + 0x508], 0x240
jae 0x12fb5ff8
mov eax, dword [esp + 0x50c]
test eax, eax
je 0x12fb5fdf
mov dword [eax], 0x240
mov ecx, dword [esp + 0x504]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
sete al
add esp, 0x4ec
ret
mov eax, dword [esp + 0x128]
test eax, eax
je 0x12fb61bd
push eax
call fcn.12f5bf8b
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x12fb619e
mov ecx, dword [esp + 0x128]
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
push 0
push 0x100
push ebp
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x128]
lea eax, [esp + 0x14]
push 0
push eax
push ecx
push ebx
push ebp
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fb6180
push 2
call fcn.12ff0660
mov edx, eax
add esp, 4
test edx, edx
je 0x12fb6161
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa5]
mov byte [esp + 0xa4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x131827f0
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xa4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
mov ecx, 0x1f
lea edi, [esp + 0x28]
mov dword [esp + 0x24], esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x12c]
push 0x80
push eax
push ecx
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x20], esi
mov esi, dword [edx]
push ebx
lea eax, [esp + 0xb8]
push ecx
push eax
mov ecx, edx
call dword [esi + 0x14]
mov esi, eax
test esi, esi
je 0x12fb614b
mov eax, dword [esp + 0x504]
mov edx, dword [esp + 0x3c]
mov ecx, eax
mov dword [ecx], edx
mov edx, dword [esp + 0x40]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x44]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x48]
mov dword [ecx + 0xc], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 0x50], ecx
jmp 0x12fb6180
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x2038
jmp 0x12fb6175
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x203d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push 0
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call fcn.12f5bf80
add esp, 4
jmp 0x12fb61bd
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x204a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov eax, dword [esp + 0x12c]
test eax, eax
jbe 0x12fb6414
push eax
call fcn.12f5bf8b
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x12fb63f5
mov ecx, dword [esp + 0x12c]
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
push 0
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x130]
add eax, 0x100
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x12c]
lea ecx, [esp + 0x14]
push 0
push ecx
push edx
push ebx
push ebp
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fb63cc
push 2
call fcn.12ff0660
mov edx, eax
add esp, 4
test edx, edx
je 0x12fb63ad
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa5]
mov byte [esp + 0xa4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x131827f0
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xa4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
mov ecx, 0x1f
lea edi, [esp + 0x28]
mov dword [esp + 0x24], esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x12c]
push 0x80
push eax
push ecx
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x20], esi
mov esi, dword [edx]
push ebx
lea eax, [esp + 0xb8]
push ecx
push eax
mov ecx, edx
call dword [esi + 0x14]
mov esi, eax
test esi, esi
je 0x12fb6397
mov eax, dword [esp + 0x504]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov edi, 1
mov dword [eax + 0x228], ecx
mov ecx, dword [esp + 0x44]
mov dword [eax + 0x22c], edx
mov edx, dword [esp + 0x48]
mov dword [eax + 0x230], ecx
mov dword [eax + 0x234], edx
mov edx, dword [esp + 0x5c]
xor ecx, ecx
cmp edx, edi
mov dword [eax + 0x214], edi
setne cl
mov dword [eax + 0x1f0], ecx
mov ecx, dword [esp + 0x60]
xor edx, edx
cmp ecx, edi
setne dl
mov dword [eax + 0x1fc], edx
mov edx, dword [esp + 0x64]
xor ecx, ecx
cmp edx, edi
setne cl
mov dword [eax + 0x208], ecx
mov ecx, dword [esp + 0x68]
xor edx, edx
cmp ecx, edi
setne dl
mov dword [eax + 0x1f4], edx
mov edx, dword [esp + 0x6c]
xor ecx, ecx
cmp edx, edi
setne cl
mov dword [eax + 0x20c], ecx
mov ecx, dword [esp + 0x70]
xor edx, edx
cmp ecx, edi
setne dl
mov dword [eax + 0x210], edx
mov dword [eax + 0x1f8], edi
jmp 0x12fb63cc
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x2079
jmp 0x12fb63c1
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x207e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push 0
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call fcn.12f5bf80
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4ec
ret
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x208a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4ec
ret