Function at 0x100c7f0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x100eab4]
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x124], eax
je 0x100c8e4
test eax, eax
je 0x100c8e4
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100c827
sub eax, edx
cmp eax, 5
jb 0x100c8e4
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100c83e
sub eax, edx
lea eax, [esi + eax - 4]
push eax
push 0x1003a18
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x100c8e4
push 0x8000
push esi
call dword [sym.imp.msvcrt.dll__open]
cmp eax, 0xffffffff
pop ecx
pop ecx
mov dword [ebp - 0x108], eax
je 0x100c8e4
mov esi, dword [sym.imp.msvcrt.dll__read]
push 0xc
lea ecx, [ebp - 0x150]
push ecx
push eax
call esi
add esp, 0xc
cmp eax, 0xc
jne 0x100c8d7
xor ebx, ebx
mov bh, byte [ebp - 0x14c]
xor edi, edi
mov bl, byte [ebp - 0x14b]
test ebx, ebx
jbe 0x100c8d7
cmp edi, 0x28
jae 0x100c8d7
push 0x10
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 0x10
jne 0x100c8d7
cmp dword [ebp - 0x134], 0x656d616e
je 0x100c8f3
inc edi
cmp edi, ebx
jb 0x100c8a8
push dword [ebp - 0x108]
call dword [sym.imp.msvcrt.dll__close]
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100d065
leave
ret
mov eax, dword [ebp - 0x12c]
mov edi, dword [sym.imp.msvcrt.dll__lseek]
mov esi, eax
mov ecx, eax
shr ecx, 0x10
and esi, 0xff0000
or esi, ecx
mov ecx, eax
shl ecx, 0x10
mov ebx, 0xff00
and eax, ebx
or ecx, eax
shl ecx, 8
shr esi, 8
or esi, ecx
push 0
push esi
push dword [ebp - 0x108]
call edi
add esp, 0xc
cmp eax, esi
jne 0x100c8d7
mov esi, dword [sym.imp.msvcrt.dll__read]
push 6
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 6
jne 0x100c8d7
xor eax, eax
mov ah, byte [ebp - 0x112]
mov al, byte [ebp - 0x111]
mov dword [ebp - 0x10c], eax
jmp 0x100c9b6
dec dword [ebp - 0x10c]
push 0xc
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 0xc
jne 0x100c8d7
movzx ax, byte [ebp - 0x11f]
mov ah, byte [ebp - 0x120]
cmp ax, 1
jne 0x100c9b6
movzx ax, byte [ebp - 0x119]
mov ah, byte [ebp - 0x11a]
cmp ax, 5
je 0x100c9c4
cmp dword [ebp - 0x10c], 0
jne 0x100c96b
jmp 0x100c8d7
mov eax, dword [ebp - 0x12c]
mov esi, eax
mov ecx, eax
shr ecx, 0x10
and esi, 0xff0000
or esi, ecx
mov ecx, eax
and eax, ebx
shl ecx, 0x10
or ecx, eax
xor eax, eax
mov ah, byte [ebp - 0x110]
shr esi, 8
shl ecx, 8
or esi, ecx
xor ebx, ebx
mov bh, byte [ebp - 0x118]
push 0
mov al, byte [ebp - 0x10f]
mov bl, byte [ebp - 0x117]
add esi, eax
xor eax, eax
mov ah, byte [ebp - 0x116]
mov al, byte [ebp - 0x115]
add esi, eax
push esi
push dword [ebp - 0x108]
call edi
add esp, 0xc
cmp eax, esi
jne 0x100c8d7
cmp ebx, 0xff
ja 0x100c8d7
push ebx
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x108]
call dword [sym.imp.msvcrt.dll__read]
add esp, 0xc
cmp eax, ebx
jne 0x100c8d7
push dword [ebp - 0x108]
mov byte [ebp + ebx - 0x104], 0
call dword [sym.imp.msvcrt.dll__close]
pop ecx
lea eax, [ebp - 0x104]
push eax
call fcn.0100c793
mov ecx, dword [ebp - 0x124]
mov dword [ecx], eax
xor eax, eax
inc eax
jmp 0x100c8e6