Function at 0x100c8c1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x1015ab4]
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 0x100c9b5
test eax, eax
je 0x100c9b5
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100c8f8
sub eax, edx
cmp eax, 5
jb 0x100c9b5
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100c90f
sub eax, edx
lea eax, [esi + eax - 4]
push eax
push 0x1003a00
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x100c9b5
push 0x8000
push esi
call dword [sym.imp.msvcrt.dll__open]
cmp eax, 0xffffffff
pop ecx
pop ecx
mov dword [ebp - 0x108], eax
je 0x100c9b5
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 0x100c9a8
xor ebx, ebx
mov bh, byte [ebp - 0x14c]
xor edi, edi
mov bl, byte [ebp - 0x14b]
test ebx, ebx
jbe 0x100c9a8
cmp edi, 0x28
jae 0x100c9a8
push 0x10
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 0x10
jne 0x100c9a8
cmp dword [ebp - 0x134], 0x656d616e
je 0x100c9c4
inc edi
cmp edi, ebx
jb 0x100c979
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.0100d125
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 0x100c9a8
mov esi, dword [sym.imp.msvcrt.dll__read]
push 6
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 6
jne 0x100c9a8
xor eax, eax
mov ah, byte [ebp - 0x11e]
mov al, byte [ebp - 0x11d]
mov dword [ebp - 0x10c], eax
jmp 0x100ca87
dec dword [ebp - 0x10c]
push 0xc
lea eax, [ebp - 0x118]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 0xc
jne 0x100c9a8
movzx ax, byte [ebp - 0x117]
mov ah, byte [ebp - 0x118]
cmp ax, 1
jne 0x100ca87
movzx ax, byte [ebp - 0x111]
mov ah, byte [ebp - 0x112]
cmp ax, 5
je 0x100ca95
cmp dword [ebp - 0x10c], 0
jne 0x100ca3c
jmp 0x100c9a8
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 - 0x11c]
shr esi, 8
shl ecx, 8
or esi, ecx
xor ebx, ebx
mov bh, byte [ebp - 0x110]
push 0
mov al, byte [ebp - 0x11b]
mov bl, byte [ebp - 0x10f]
add esi, eax
xor eax, eax
mov ah, byte [ebp - 0x10e]
mov al, byte [ebp - 0x10d]
add esi, eax
push esi
push dword [ebp - 0x108]
call edi
add esp, 0xc
cmp eax, esi
jne 0x100c9a8
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 0x100c9a8
push dword [ebp - 0x108]
xor eax, eax
mov ah, byte [ebp - 0x110]
mov al, byte [ebp - 0x10f]
mov byte [ebp + eax - 0x104], 0
call dword [sym.imp.msvcrt.dll__close]
pop ecx
lea eax, [ebp - 0x104]
push eax
call fcn.0100c864
mov ecx, dword [ebp - 0x124]
mov dword [ecx], eax
xor eax, eax
inc eax
jmp 0x100c9b7