Function at 0x51c630
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
sar eax, 6
mov ecx, dword [ebp + 8]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x589500]
mov ecx, dword [eax + edx + 0x18]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 0x10], 0
je 0x51c6a0
mov edx, dword [ebp + 0xc]
movzx eax, word [edx]
cmp eax, 0xa
jne 0x51c6a0
mov ecx, dword [ebp + 8]
sar ecx, 6
mov edx, dword [ebp + 8]
and edx, 0x3f
imul eax, edx, 0x38
mov ecx, dword [ecx*4 + 0x589500]
movzx edx, byte [ecx + eax + 0x28]
or edx, 4
mov eax, dword [ebp + 8]
sar eax, 6
mov ecx, dword [ebp + 8]
and ecx, 0x3f
imul ecx, ecx, 0x38
mov eax, dword [eax*4 + 0x589500]
mov byte [eax + ecx + 0x28], dl
jmp 0x51c6d8
mov ecx, dword [ebp + 8]
sar ecx, 6
mov edx, dword [ebp + 8]
and edx, 0x3f
imul eax, edx, 0x38
mov ecx, dword [ecx*4 + 0x589500]
movzx edx, byte [ecx + eax + 0x28]
and edx, 0xfffffffb
mov eax, dword [ebp + 8]
sar eax, 6
mov ecx, dword [ebp + 8]
and ecx, 0x3f
imul ecx, ecx, 0x38
mov eax, dword [eax*4 + 0x589500]
mov byte [eax + ecx + 0x28], dl
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jae 0x51c92a
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx]
cmp edx, 0x1a
jne 0x51c790
mov eax, dword [ebp + 8]
sar eax, 6
mov ecx, dword [ebp + 8]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x589500]
movzx ecx, byte [eax + edx + 0x28]
and ecx, 0x40
jne 0x51c765
mov edx, dword [ebp + 8]
sar edx, 6
mov eax, dword [ebp + 8]
and eax, 0x3f
imul ecx, eax, 0x38
mov edx, dword [edx*4 + 0x589500]
movzx eax, byte [edx + ecx + 0x28]
or eax, 2
mov ecx, dword [ebp + 8]
sar ecx, 6
mov edx, dword [ebp + 8]
and edx, 0x3f
imul edx, edx, 0x38
mov ecx, dword [ecx*4 + 0x589500]
mov byte [ecx + edx + 0x28], al
jmp 0x51c78b
mov edx, dword [ebp - 0x14]
mov ax, word [edx]
mov word [ebp - 6], ax
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
mov ax, word [ebp - 6]
mov word [edx], ax
mov ecx, dword [ebp - 0x10]
add ecx, 2
mov dword [ebp - 0x10], ecx
jmp 0x51c92a
mov edx, dword [ebp - 0x14]
movzx eax, word [edx]
cmp eax, 0xd
je 0x51c7c6
mov ecx, dword [ebp - 0x14]
mov dx, word [ecx]
mov word [ebp - 8], dx
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x10]
mov dx, word [ebp - 8]
mov word [ecx], dx
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ebp - 0x10], eax
jmp 0x51c6f0
mov ecx, dword [ebp - 0x14]
add ecx, 2
cmp ecx, dword [ebp - 0x18]
jae 0x51c827
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + 2]
cmp eax, 0xa
jne 0x51c7fc
mov ecx, dword [ebp - 0x14]
add ecx, 4
mov dword [ebp - 0x14], ecx
mov edx, 0xa
mov eax, dword [ebp - 0x10]
mov word [eax], dx
mov ecx, dword [ebp - 0x10]
add ecx, 2
mov dword [ebp - 0x10], ecx
jmp 0x51c822
mov edx, dword [ebp - 0x14]
mov ax, word [edx]
mov word [ebp - 0xa], ax
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
mov ax, word [ebp - 0xa]
mov word [edx], ax
mov ecx, dword [ebp - 0x10]
add ecx, 2
mov dword [ebp - 0x10], ecx
jmp 0x51c6f0
mov edx, dword [ebp - 0x14]
add edx, 2
mov dword [ebp - 0x14], edx
push 0
lea eax, [ebp - 0x20]
push eax
push 2
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x51c850
cmp dword [ebp - 0x20], 0
jne 0x51c869
mov eax, 0xd
mov ecx, dword [ebp - 0x10]
mov word [ecx], ax
mov edx, dword [ebp - 0x10]
add edx, 2
mov dword [ebp - 0x10], edx
jmp 0x51c6f0
mov eax, dword [ebp + 8]
sar eax, 6
mov ecx, dword [ebp + 8]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x589500]
movzx ecx, byte [eax + edx + 0x28]
and ecx, 0x48
je 0x51c8cf
movzx edx, word [ebp - 4]
cmp edx, 0xa
jne 0x51c8a8
mov eax, 0xa
mov ecx, dword [ebp - 0x10]
mov word [ecx], ax
mov edx, dword [ebp - 0x10]
add edx, 2
mov dword [ebp - 0x10], edx
jmp 0x51c8cd
mov eax, 0xd
mov ecx, dword [ebp - 0x10]
mov word [ecx], ax
mov edx, dword [ebp - 0x10]
add edx, 2
mov dword [ebp - 0x10], edx
movzx eax, word [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051ca40
add esp, 8
jmp 0x51c925
movzx edx, word [ebp - 4]
cmp edx, 0xa
jne 0x51c8f6
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jne 0x51c8f6
mov ecx, 0xa
mov edx, dword [ebp - 0x10]
mov word [edx], cx
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ebp - 0x10], eax
jmp 0x51c925
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
mov ecx, dword [ebp + 8]
push ecx
call fcn.0046e726
add esp, 0x10
movzx edx, word [ebp - 4]
cmp edx, 0xa
je 0x51c925
mov eax, 0xd
mov ecx, dword [ebp - 0x10]
mov word [ecx], ax
mov edx, dword [ebp - 0x10]
add edx, 2
mov dword [ebp - 0x10], edx
jmp 0x51c6f0
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
sar eax, 1
shl eax, 1
mov esp, ebp
pop ebp
ret