Function at 0x12fb86a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3e0
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
push edi
mov dword [0x131c8f38], ebx
call esi
mov dword [0x131c8f40], eax
mov eax, dword [0x131c8f44]
cmp eax, ebx
jne 0x12fb86f0
mov dword [0x131c8f38], 2
mov dword [0x131c8f3c], 0x2541
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e0
ret
mov esi, dword [esp + 0x3f4]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x14]
push 1
push eax
push ebx
push esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call ebp
mov dword [esp + 0x10], eax
mov ecx, 0xf3
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
cmp esi, 0xffffffff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x12fb878b
lea ecx, [esp + 0x20]
test ecx, ecx
je 0x12fb878b
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fb87aa
mov ecx, 0xf4
xor eax, eax
lea edi, [esp + 0x20]
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
push ebx
push edx
lea eax, [esp + 0x28]
push 0x3d0
push eax
push esi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fb8784
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
jmp 0x12fb879f
mov edi, 1
jmp 0x12fb87ac
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
xor edi, edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ebx
push ecx
push edx
push esi
call ebp
cmp edi, ebx
jne 0x12fb87ea
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x2552
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e0
ret
push ebx
push ebx
lea eax, [esp + 0x28]
push ebx
push eax
call fcn.12fb92e0
add esp, 0x10
cmp eax, 4
je 0x12fb882b
mov dword [0x131c8f38], 0x18
mov dword [0x131c8f3c], 0x255a
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e0
ret
mov eax, dword [esp + 0x3f8]
cmp eax, ebx
jne 0x12fb8882
push 0x370
call fcn.12f5bf8b
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x12fb8875
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x2564
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e0
ret
mov ecx, 0xdc
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
jmp 0x12fb8884
mov ebx, eax
mov eax, dword [esp + 0x404]
test eax, eax
je 0x12fb8898
mov ecx, dword [esp + 0x48]
and ecx, 2
mov dword [eax], ecx
lea edx, [esp + 0x20]
push ebx
push edx
xor edi, edi
call fcn.12fb9520
add esp, 8
test eax, eax
je 0x12fb897b
mov eax, dword [esp + 0x3fc]
test eax, eax
jne 0x12fb88cc
mov eax, dword [esp + 0x400]
test eax, eax
je 0x12fb899c
jmp 0x12fb892c
mov eax, dword [ebx + 0x358]
mov ecx, dword [ebx + 0x35c]
lea edi, [ebx + 0x358]
lea edx, [esp + 0x1c]
push 1
push edx
push eax
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
call ebp
mov eax, dword [esp + 0x3fc]
mov ecx, dword [esp + 0x40]
push eax
push edi
push ecx
push esi
call fcn.12fb9160
add esp, 0x10
mov edi, eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push edx
push eax
push esi
call ebp
test edi, edi
je 0x12fb89a1
mov eax, dword [esp + 0x400]
test eax, eax
je 0x12fb89a1
mov eax, dword [ebx + 0x340]
mov ecx, dword [ebx + 0x344]
lea edi, [ebx + 0x340]
lea edx, [esp + 0x1c]
push 1
push edx
push eax
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
call ebp
mov eax, dword [esp + 0x400]
mov ecx, dword [esp + 0x40]
push eax
push edi
push ecx
push esi
call fcn.12fb9160
add esp, 0x10
mov edi, eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push edx
push eax
push esi
call ebp
jmp 0x12fb89a1
mov dword [0x131c8f38], 0x18
mov dword [0x131c8f3c], 0x2577
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
jmp 0x12fb89a1
mov edi, 1
mov eax, dword [esp + 0x3f8]
test eax, eax
jne 0x12fb89b9
test ebx, ebx
je 0x12fb89b9
push ebx
call fcn.12f5bf80
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3e0
ret