Function at 0x12fb5400
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x7d0
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 dword [0x131c8f40], eax
mov eax, dword [0x131c8f44]
cmp eax, edi
jne 0x12fb5450
mov dword [0x131c8f38], 2
mov dword [0x131c8f3c], 0x1e9d
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7d0
ret
mov ebx, dword [esp + 0x7e4]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x24]
push 1
push eax
push edi
push ebx
mov dword [esp + 0x34], edi
call ebp
push edi
push edi
push edi
push ebx
mov dword [esp + 0x40], eax
call ebp
mov ecx, 0xf7
xor eax, eax
lea edi, [esp + 0x401]
mov byte [esp + 0x400], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp ebx, 0xffffffff
stosb byte es:[edi], al
je 0x12fb54fc
lea ecx, [esp + 0x400]
test ecx, ecx
je 0x12fb54fc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fb5517
mov ecx, 0xf8
xor eax, eax
lea edi, [esp + 0x400]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], eax
push eax
push edx
lea eax, [esp + 0x408]
push 0x3e0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fb54f5
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
jmp 0x12fb5510
mov esi, 1
jmp 0x12fb5519
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
call esi
mov dword [0x131c8f40], eax
xor esi, esi
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x24]
push 0
push ecx
push edx
push ebx
call ebp
test esi, esi
jne 0x12fb5558
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x1eb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7d0
ret
mov eax, dword [esp + 0x424]
test ah, 1
jne 0x12fb5580
mov ecx, dword [esp + 0x7e8]
call fcn.12f928c0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x7d0
ret
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0x79]
mov byte [esp + 0x78], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x78]
lea ecx, [esp + 0x400]
push eax
push ecx
call fcn.12fb9df0
add esp, 8
test eax, eax
jne 0x12fb55da
mov dword [0x131c8f38], 0x14
mov dword [0x131c8f3c], 0x1ec0
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7d0
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
mov dword [0x131c8f38], ebp
call esi
lea edx, [esp + 0x78]
mov dword [0x131c8f40], eax
test edx, edx
jne 0x12fb5617
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x3745
call esi
mov dword [0x131c8f40], eax
jmp 0x12fb56e7
cmp dword [0x131c8f44], ebp
jne 0x12fb563f
mov dword [0x131c8f38], 2
mov dword [0x131c8f3c], 0x374b
call esi
mov dword [0x131c8f40], eax
jmp 0x12fb56e7
cmp dword [0x131c94f4], ebp
jne 0x12fb5672
mov eax, dword [esp + 0x264]
mov edx, dword [esp + 0x26c]
mov ecx, dword [0x131c8f54]
cmp eax, 0x2710
ja 0x12fb56c9
cmp ecx, 0x2710
ja 0x12fb5672
cmp ecx, eax
je 0x12fb5672
cmp eax, ebp
jne 0x12fb56d9
mov ecx, dword [esp + 0x3f8]
mov dword [esp + 0x2c], ebp
cmp ecx, ebp
jne 0x12fb570f
mov eax, dword [esp + 0xb4]
mov esi, dword [esp + 0xb0]
cmp eax, ebp
mov dword [esp + 0x28], esi
je 0x12fb5729
mov ecx, dword [esp + 0xb8]
push ebp
dec eax
push ecx
push ebp
push eax
call fcn.12f618d0
mov ecx, dword [esp + 0xbc]
xor edi, edi
add eax, ecx
adc edx, edi
add esi, eax
mov eax, ebp
mov dword [esp + 0x28], esi
adc eax, edx
jmp 0x12fb5725
cmp eax, ecx
jne 0x12fb56d9
cmp dword [0x131c8f5c], ebp
ja 0x12fb5672
cmp edx, ebp
je 0x12fb5672
push edx
push eax
call fcn.12fc04c0
add esp, 8
cmp eax, ebp
jne 0x12fb5672
mov dword [0x131c8f38], 0x1f
mov dword [0x131c8f3c], 0x1ec7
call esi
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x7d0
ret
mov esi, dword [esp + 0x3f0]
mov eax, dword [esp + 0x3f4]
add esi, ecx
mov dword [esp + 0x28], esi
adc eax, ebp
mov dword [esp + 0x2c], eax
xor edi, edi
lea edx, [esp + 0x2c]
push edi
push edx
push esi
push ebx
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x14]
push edi
xor eax, eax
push ecx
lea edx, [esp + 0x20]
push 0xc
mov dword [esp + 0x28], eax
push edx
push ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], eax
call esi
test eax, eax
je 0x12fb58f4
cmp dword [esp + 0x18], 0x545787ab
jne 0x12fb590a
mov eax, dword [esp + 0x20]
push eax
call fcn.12f5bf8b
mov ebp, eax
add esp, 4
cmp ebp, edi
je 0x12fb5920
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push edi
push ecx
push edx
push ebp
push ebx
mov dword [esp + 0x28], edi
call esi
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jb 0x12fb5936
mov ecx, dword [esp + 0x1c]
push ecx
push eax
push ebp
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fb594c
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x420]
lea edx, [esp + 0x38]
push 0x40
push edx
push eax
call fcn.12faed50
add esp, 0xc
test eax, eax
jne 0x12fb5845
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x7e8]
push 0xffffffffffffffff
push ecx
mov ecx, edi
call fcn.12f925c0
mov edx, dword [esp + 0x20]
mov ecx, edi
mov esi, ebp
mov dword [esp + 0x10], edx
call fcn.12f92cd0
mov edx, dword [esp + 0x10]
mov edi, eax
mov ecx, edx
mov dword [esp + 0x10], 1
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x12fb596b
push eax
call fcn.12ff0660
mov esi, eax
add esp, 4
test esi, esi
je 0x12fb58de
mov eax, dword [esp + 0x20]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0xc]
mov ecx, dword [esp + 0x7e8]
mov edi, eax
push 0xffffffffffffffff
push edi
call fcn.12f925c0
mov edx, dword [esi]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x7ec]
push edi
mov dword [esp + 0x3c], 0
mov dword [esp + 0x18], edx
call fcn.12f92cd0
push eax
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
push edx
mov edx, dword [esp + 0x20]
dec ecx
push ebp
lea eax, [esp + 0x4c]
push ecx
push eax
mov ecx, esi
call dword [edx + 0x14]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x12fb596b
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x1f2a
jmp 0x12fb5960
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x1f2f
jmp 0x12fb5960
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x1eeb
jmp 0x12fb5960
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x1ef1
jmp 0x12fb5960
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x1ef9
jmp 0x12fb5960
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x1f02
jmp 0x12fb5960
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x1f09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x24]
push 0
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebp, ebp
je 0x12fb598b
push ebp
call fcn.12f5bf80
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7d0
ret