Function at 0x100cbb4
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 0x100cca8
test eax, eax
je 0x100cca8
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100cbeb
sub eax, edx
cmp eax, 5
jb 0x100cca8
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100cc02
sub eax, edx
lea eax, [esi + eax - 4]
push eax
push 0x1003a08
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x100cca8
push 0x8000
push esi
call dword [sym.imp.msvcrt.dll__open]
cmp eax, 0xffffffff
pop ecx
pop ecx
mov dword [ebp - 0x108], eax
je 0x100cca8
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 0x100cc9b
xor ebx, ebx
mov bh, byte [ebp - 0x14c]
xor edi, edi
mov bl, byte [ebp - 0x14b]
test ebx, ebx
jbe 0x100cc9b
cmp edi, 0x28
jae 0x100cc9b
push 0x10
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 0x108]
call esi
add esp, 0xc
cmp eax, 0x10
jne 0x100cc9b
cmp dword [ebp - 0x134], 0x656d616e
je 0x100ccb7
inc edi
cmp edi, ebx
jb 0x100cc6c
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.0100d415
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 0x100cc9b
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 0x100cc9b
xor eax, eax
mov ah, byte [ebp - 0x112]
mov al, byte [ebp - 0x111]
mov dword [ebp - 0x10c], eax
jmp 0x100cd7a
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 0x100cc9b
movzx ax, byte [ebp - 0x11f]
mov ah, byte [ebp - 0x120]
cmp ax, 1
jne 0x100cd7a
movzx ax, byte [ebp - 0x119]
mov ah, byte [ebp - 0x11a]
cmp ax, 5
je 0x100cd88
cmp dword [ebp - 0x10c], 0
jne 0x100cd2f
jmp 0x100cc9b
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 0x100cc9b
cmp ebx, 0xff
ja 0x100cc9b
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 0x100cc9b
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.0100cb57
mov ecx, dword [ebp - 0x124]
mov dword [ecx], eax
xor eax, eax
inc eax
jmp 0x100ccaa