Function at 0x1003b181
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x1003b363
mov esi, dword [ebp + 8]
mov eax, esi
sar eax, 5
and esi, 0x1f
lea edi, [eax*4 + 0x10090900]
mov eax, dword [edi]
lea esi, [esi + esi*8]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x1003b363
test cl, 0x48
je 0x1003b1ee
cmp byte [eax + 5], 0xa
je 0x1003b1ee
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1003b240
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1003b228
call fcn.10032557
mov dword [eax], 9
call fcn.1003256a
mov dword [eax], esi
jmp 0x1003b238
cmp eax, 0x6d
je 0x1003b363
push eax
call fcn.1003257d
pop ecx
or eax, 0xffffffff
jmp 0x1003b365
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x1003b35e
test eax, eax
je 0x1003b267
cmp byte [ebx], 0xa
jne 0x1003b267
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x1003b270
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x1003b358
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x1003b33e
cmp al, 0xd
je 0x1003b2a2
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x1003b330
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x1003b2bc
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x1003b2b7
add dword [ebp + 0x10], 2
jmp 0x1003b310
mov dword [ebp + 0x10], eax
jmp 0x1003b32c
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1003b2e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1003b32c
cmp dword [ebp - 0xc], 0
je 0x1003b32c
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x1003b305
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x1003b310
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x1003b32f
cmp ebx, dword [ebp + 0xc]
jne 0x1003b315
cmp byte [ebp - 1], 0xa
jne 0x1003b315
mov byte [ebx], 0xa
jmp 0x1003b32f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1003ba04
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1003b330
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x1003b286
jmp 0x1003b358
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x1003b350
lea esi, [eax + esi + 4]
or byte [esi], 2
jmp 0x1003b358
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
mov byte [ebx], al
inc ebx
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x1003b365
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret