Function at 0x4a820
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
push ebp
mov esi, dword [esp + 0x20]
cmp esi, dword [0x1b3220]
jb 0x4a854
mov dword [0x1b1f0c], 9
mov dword [0x1b1f10], 0
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
sub edi, edi
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
cmp edx, edi
je 0x4aa3a
mov cl, byte [esi + 0x1b3228]
test cl, 2
jne 0x4aa3a
test cl, 0x48
je 0x4a895
mov cl, byte [esi + str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n]
cmp cl, 0xa
je 0x4a895
mov byte [eax], cl
inc eax
mov edi, 1
dec edx
mov byte [esi + str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n], 0xa
lea ecx, [esp + 0x18]
push 0
push ecx
push edx
push eax
mov eax, dword [esi*4 + 0x1b3328]
push eax
call sub.KERNEL32.dll_ReadFile
or eax, eax
jne 0x4a900
call sub.KERNEL32.dll_GetLastError
cmp eax, 5
jne 0x4a8d5
mov dword [0x1b1f0c], 9
mov dword [0x1b1f10], eax
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
cmp eax, 0x6d
jne 0x4a8e4
sub eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
push eax
call fcn.000497b0
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
add edi, dword [esp + 0x18]
mov cl, byte [esi + 0x1b3228]
test cl, 0x80
je 0x4aa30
mov eax, dword [esp + 0x24]
cmp byte [eax], 0xa
jne 0x4a921
or cl, 4
jmp 0x4a924
and cl, 0xfb
mov byte [esi + 0x1b3228], cl
mov ebp, dword [esp + 0x24]
mov ebx, ebp
mov eax, ebp
add eax, edi
mov dword [esp + 0x14], eax
mov eax, ebp
cmp eax, dword [esp + 0x14]
jae 0x4aa2a
mov al, byte [ebx]
cmp al, 0x1a
je 0x4aa18
cmp al, 0xd
je 0x4a95b
mov byte [ebp], al
inc ebx
jmp 0x4aa0b
mov ecx, dword [esp + 0x14]
dec ecx
cmp ecx, ebx
jbe 0x4a982
lea ecx, [ebx + 1]
cmp byte [ecx], 0xa
jne 0x4a978
add ebx, 2
mov byte [ebp], 0xa
jmp 0x4aa0b
mov byte [ebp], al
mov ebx, ecx
jmp 0x4aa0b
sub edi, edi
lea eax, [esp + 0x18]
push edi
push eax
lea eax, [esp + 0x1b]
push 1
inc ebx
push eax
mov eax, dword [esi*4 + 0x1b3328]
push eax
call sub.KERNEL32.dll_ReadFile
cmp eax, edi
jne 0x4a9aa
call sub.KERNEL32.dll_GetLastError
mov edi, eax
or edi, edi
jne 0x4aa07
cmp dword [esp + 0x18], 0
je 0x4aa07
test byte [esi + 0x1b3228], 0x48
je 0x4a9e0
cmp byte [esp + 0x13], 0xa
jne 0x4a9cb
mov byte [ebp], 0xa
jmp 0x4aa0b
mov byte [ebp], 0xd
inc ebp
mov al, byte [esp + 0x13]
mov byte [esi + str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n], al
jmp 0x4aa0c
cmp dword [esp + 0x24], ebp
jne 0x4a9f3
cmp byte [esp + 0x13], 0xa
jne 0x4a9f3
mov byte [ebp], 0xa
jmp 0x4aa0b
push 1
push 0xffffffffffffffff
push esi
call fcn.0004a570
add esp, 0xc
cmp byte [esp + 0x13], 0xa
je 0x4aa0c
mov byte [ebp], 0xd
inc ebp
cmp ebx, dword [esp + 0x14]
jb 0x4a944
jmp 0x4aa2a
mov al, byte [esi + 0x1b3228]
test al, 0x40
jne 0x4aa2a
or al, 2
mov byte [esi + 0x1b3228], al
mov edi, ebp
sub edi, dword [esp + 0x24]
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
sub eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret