Function at 0x100d14a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x1016a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x11c], eax
test esi, esi
je 0x100d24a
test eax, eax
je 0x100d24a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100d183
sub eax, edx
cmp eax, 5
jb 0x100d24a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100d19a
sub eax, edx
lea eax, [esi + eax - 4]
push eax
push 0x1003b44
call dword [sym.imp.msvcrt.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x100d24a
push 0x8000
push esi
call dword [sym.imp.msvcrt.dll__open]
pop ecx
pop ecx
mov dword [ebp - 0x108], eax
cmp eax, 0xffffffff
je 0x100d24a
mov edi, dword [sym.imp.msvcrt.dll__read]
push 0xc
lea ecx, [ebp - 0x150]
push ecx
push eax
call edi
add esp, 0xc
cmp eax, 0xc
jne 0x100d23d
mov eax, dword [ebp - 0x14c]
movzx cx, al
shl cx, 8
shr eax, 8
movzx esi, cx
movzx eax, al
or esi, eax
push 0
pop ebx
jbe 0x100d23d
cmp ebx, 0x28
jae 0x100d23d
push 0x10
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 0x108]
call edi
add esp, 0xc
cmp eax, 0x10
jne 0x100d23d
cmp dword [ebp - 0x134], 0x656d616e
je 0x100d25b
inc ebx
cmp ebx, esi
jb 0x100d20e
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
xor ecx, ebp
pop ebx
call fcn.0100dc5b
leave
ret
mov eax, dword [ebp - 0x12c]
mov ebx, 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 edi, 0xff00
and eax, edi
or ecx, eax
shl ecx, 8
shr esi, 8
or esi, ecx
push 0
push esi
push dword [ebp - 0x108]
call ebx
add esp, 0xc
cmp eax, esi
jne 0x100d23d
push 6
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x108]
call dword [sym.imp.msvcrt.dll__read]
add esp, 0xc
cmp eax, 6
jne 0x100d23d
mov eax, dword [ebp - 0x122]
movzx cx, al
shl cx, 8
shr eax, 8
movzx esi, cx
movzx eax, al
or esi, eax
je 0x100d23d
push 0xc
lea eax, [ebp - 0x118]
push eax
push dword [ebp - 0x108]
dec esi
call dword [sym.imp.msvcrt.dll__read]
add esp, 0xc
cmp eax, 0xc
jne 0x100d23d
mov eax, dword [ebp - 0x118]
movzx cx, byte [ebp - 0x118]
shr eax, 8
movzx ax, al
shl cx, 8
or ax, cx
cmp ax, 1
jne 0x100d340
mov eax, dword [ebp - 0x112]
movzx cx, byte [ebp - 0x112]
shr eax, 8
movzx ax, al
shl cx, 8
or ax, cx
cmp ax, 5
je 0x100d349
test esi, esi
jne 0x100d2da
jmp 0x100d23d
mov eax, dword [ebp - 0x12c]
mov esi, eax
mov ecx, eax
shr ecx, 0x10
and esi, 0xff0000
or esi, ecx
mov ecx, eax
shl ecx, 0x10
and eax, edi
or ecx, eax
mov eax, dword [ebp - 0x120]
shl ecx, 8
shr esi, 8
or esi, ecx
movzx cx, al
shl cx, 8
shr eax, 8
movzx ecx, cx
movzx eax, al
or ecx, eax
mov eax, dword [ebp - 0x10e]
add esi, ecx
movzx cx, al
shl cx, 8
shr eax, 8
movzx eax, al
movzx ecx, cx
or ecx, eax
mov eax, dword [ebp - 0x110]
add esi, ecx
movzx cx, al
shl cx, 8
shr eax, 8
push 0
movzx edi, cx
movzx eax, al
push esi
push dword [ebp - 0x108]
or edi, eax
call ebx
add esp, 0xc
cmp eax, esi
jne 0x100d23d
cmp edi, 0xff
ja 0x100d23d
push edi
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x108]
call dword [sym.imp.msvcrt.dll__read]
add esp, 0xc
cmp eax, edi
jne 0x100d23d
push dword [ebp - 0x108]
mov byte [ebp + edi - 0x104], 0
call dword [sym.imp.msvcrt.dll__close]
pop ecx
lea eax, [ebp - 0x104]
push eax
call fcn.0100d0ed
mov ecx, dword [ebp - 0x11c]
mov dword [ecx], eax
xor eax, eax
inc eax
jmp 0x100d24c