Function at 0x40a5e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
cmp eax, dword [0x48f9c0]
jae 0x40a60e
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x48f9e0]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 1
jne 0x40a62a
mov dword [0x48f374], 9
mov dword [0x48f378], 0
or eax, 0xffffffff
jmp 0x40aa28
mov dword [ebp - 0x18], 0
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], edx
cmp dword [ebp + 0x10], 0
je 0x40a65a
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x48f9e0]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 2
je 0x40a661
xor eax, eax
jmp 0x40aa28
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x48f9e0]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 0x48
je 0x40a6ea
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
movsx edx, byte [ecx + eax*8 + 5]
cmp edx, 0xa
je 0x40a6ea
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x48f9e0]
mov eax, dword [ebp - 0x1c]
mov cl, byte [edx + ecx*8 + 5]
mov byte [eax], cl
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 1
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
mov byte [ecx + eax*8 + 5], 0xa
push 0
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
mov edx, dword [ecx + eax*8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a763
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 5
jne 0x40a742
mov dword [0x48f374], 9
mov eax, dword [ebp - 0x10]
mov dword [0x48f378], eax
or eax, 0xffffffff
jmp 0x40aa28
cmp dword [ebp - 0x10], 0x6d
jne 0x40a74f
xor eax, eax
jmp 0x40aa28
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00411060
add esp, 4
or eax, 0xffffffff
jmp 0x40aa28
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x48f9e0]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 0x80
je 0x40aa25
cmp dword [ebp - 0xc], 0
je 0x40a7d4
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x40a7d4
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x48f9e0]
movsx eax, byte [edx + ecx*8 + 4]
or eax, 4
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov ecx, dword [ecx*4 + 0x48f9e0]
mov byte [ecx + edx*8 + 4], al
jmp 0x40a806
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
movsx edx, byte [ecx + eax*8 + 4]
and edx, 0xfffffffb
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov eax, dword [eax*4 + 0x48f9e0]
mov byte [eax + ecx*8 + 4], dl
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x18]
cmp dword [ebp - 4], eax
jae 0x40aa1c
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x1a
jne 0x40a880
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x48f9e0]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 0x40
jne 0x40a87b
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x48f9e0]
movsx ecx, byte [eax + edx*8 + 4]
or ecx, 2
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov edx, dword [edx*4 + 0x48f9e0]
mov byte [edx + eax*8 + 4], cl
jmp 0x40aa1c
mov eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0xd
je 0x40a8ac
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x40aa17
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx - 1]
cmp dword [ebp - 4], eax
jae 0x40a902
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx + 1]
cmp edx, 0xa
jne 0x40a8e1
mov eax, dword [ebp - 4]
add eax, 2
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xa
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x40a8fd
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
jmp 0x40aa17
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea ecx, [ebp - 5]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
mov edx, dword [ecx + eax*8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a948
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40a954
cmp dword [ebp - 0xc], 0
jne 0x40a968
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0x40aa17
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
movsx edx, byte [ecx + eax*8 + 4]
and edx, 0x48
je 0x40a9ca
movsx eax, byte [ebp - 5]
cmp eax, 0xa
jne 0x40a99f
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xa
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x40a9c8
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
mov dl, byte [ebp - 5]
mov byte [ecx + eax*8 + 5], dl
jmp 0x40aa17
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0xc]
jne 0x40a9ec
movsx ecx, byte [ebp - 5]
cmp ecx, 0xa
jne 0x40a9ec
mov edx, dword [ebp - 0x14]
mov byte [edx], 0xa
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x40aa17
push 1
push 0xffffffffffffffff
mov ecx, dword [ebp + 8]
push ecx
call fcn.00411920
add esp, 0xc
mov dword [ebp - 0x20], eax
movsx edx, byte [ebp - 5]
cmp edx, 0xa
je 0x40aa17
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0x40a812
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret